If you’re using Windows, you’ll want to install Rtools.
use Hadley Wickham’s devtools package. You can then build and install the package from within R.
Start R within your package directory (so that your package directory is R’s working directory).
Install devtools by typing (within R)
install.packages(devtools)
Then load the devtools package with
library(devtools)
Then, to build the package, type