Install and Get Started
install np, install npRmpi, install crs, quickstart, RStudio, MPI
This page is intentionally short. The goal is to get you from installation to a first successful run without making you read a general introduction to R first.
Step 1: install R and an editor
You will need a working installation of R and, if you prefer an IDE, RStudio / Posit Desktop.
Step 2: install the package you want
For np and crs, installation from CRAN is straightforward.
install.packages("np")
install.packages("crs")For npRmpi, installation depends on the MPI implementation available on your system. The current platform and mode guidance lives on MPI and Large Data.
Step 2a: if you need npRmpi, choose the right first run
- On macOS and Linux, start with the
session/spawnquickstart unless you already know you needmpiexec. - On Windows, start with
attachmode undermpiexec; the current package source explicitly treats that as the supported entry path rather thanspawn. - If you need explicit broadcast control or a heterogeneous-cluster workflow, use the
profileroute on MPI and Large Data.
Step 2b: use the smallest runnable script first
The quickest way to see working code is now Quickstarts. That page shows the small starter scripts inline so you can copy them directly without downloading anything first.
Step 3: test that the package loads
These are simple first checks.
library(np)
example(npreg)library(crs)
example(crs)A small first run in np
If you want a very small end-to-end example, this is a good place to begin.
library(np)
data(cps71, package = "np")
fit <- npreg(logwage ~ age, data = cps71)
plot(cps71$age, cps71$logwage, cex = 0.25, col = "grey")
lines(cps71$age, fitted(fit), col = 2, lwd = 2)What next?
- If you are deciding between packages, go to Choose a Package.
- If you want the smallest runnable scripts first, go to Quickstarts.
- If you want more kernel examples, go to Kernel Methods.
- If you need MPI, go to MPI and Large Data.
- If you want downloadable
npRmpiquickstarts, go to Code Catalog. - If you want longer scripts, go to Worked Examples.