Skip to content
This repository has been archived by the owner on Jul 19, 2018. It is now read-only.
/ jetpack-v1 Public archive

Simple package manager for R

License

Notifications You must be signed in to change notification settings

ankane/jetpack-v1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jetpack

🔥 Simple package manager for R


Get the next generation version


Specify all your packages in one place

package("plyr")
package("reshape2", "1.4.0")
package("forecast", github="robjhyndman/forecast")

Install them with a single command, and include them all at once - no need for library calls.

Jetpack is lightweight and uses a secure CRAN mirror by default.

How to Use

Add Jetpack to your project

cd path/to/your/project
curl -LsO https://raw.github.com/ankane/jetpack-v1/master/jetpack.R

Create packages.R and add your packages

package("plyr")
package("reshape2", "1.4.0")
package("forecast", github="robjhyndman/forecast")

Install packages

Rscript jetpack.R

Optional: Instead of including packages individually, you can add these lines to the start of your scripts

source("jetpack.R")
jetpack.require()

Adding New Packages

Add the package to packages.R

package("inTrees")

and run

Rscript jetpack.R

That’s all there is to it!

Heroku

Create an init.R with:

source("jetpack.R")
jetpack.install()

The first deploy can take a few minutes, but future deploys should be very fast.

Buildpack docs

A Few Notes

Be sure to check jetpack.R and packages.R into version control.

If deploying your project, you can run Rscript jetpack.R on every deploy to keep your servers up-to-date. This command is extremely fast if all packages are installed.

More Notes

Jetpack is simple.

  • No additional dependency resolution
  • Libraries are installed globally
  • Versioning is not supported

For more advanced projects, check out

Reference

Update packages

Rscript jetpack.R update

Update a single package

Rscript jetpack.R update plyr

More verbosity

VERBOSE=1 Rscript jetpack.R

Specify a mirror in packages.R with

repo("https://cran.r-project.org/")

Upgrading

To get the latest version, run

cd path/to/your/project
curl -LsO https://raw.github.com/ankane/jetpack-v1/master/jetpack.R

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

About

Simple package manager for R

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages