Code Monkey home page Code Monkey logo

wayback's Introduction

Rock Solid Package Installation for Legacy R Versions

Status

AppVeyor build status Codecov

lines of R code: 299, lines of test code: 0

Version

0.2.3 ( 2020-08-19 20:27:40 )

Description

Make sure packages are available at runtime without any setup. Package installation, reproducibility and exchanging code can be frunstrating especially if code is used on older R versions. Often it is hard to puzzle out which package versions are able to work together after some years have passed and packages evolved further and further. The ‘wayback’ package aims to make this process as painless and robust as possible by using ‘MRAN’s ’CRAN’ snapshots to build local package libraries from way back.

License

GPL-3
Peter Meissner [aut, cre], virtual7 [cph]

Citation

citation("wayback")
Meissner P (2020). wayback: Rock Solid Package Installation for Legacy R Versions. R package version 0.2.3.

BibTeX for citing

BibTeX(citation("wayback"))
@Manual{,
  title = {wayback: Rock Solid Package Installation for Legacy R Versions},
  author = {Peter Meissner},
  year = {2020},
  note = {R package version 0.2.3},
}

Installation

Stable version from CRAN:

install.packages("wayback")

Package Usage

library(wayback)

The main function of the package is wb_require(). Once {wayback} is installed this function allows to have required packages loaded from a library specified. In addition wb_require() will install packages that are not present but required.

The real core strength and purpose of the package is to install packages and dependencies from a specific point in time. This is provided by the date parameter allowing to go back in time - especially to a point in time where known to have consistent states of packages and dependencies for a given version of R.

suppressPackageStartupMessages(
  wb_require(
    pkg          = "glue", 
    date         = Sys.Date(),
    library_path = "./r_package_library"
  )
)
## loaded glue
info <- packageDescription("glue", lib.loc = "./r_package_library")

info$Packaged
## [1] "2020-05-13 14:58:42 UTC; jhester"

Package Use Cases and Scope

Package Maxims and Trade Offs

  • given {wayback} is installed everything else should just work
  • {wayback} will not change how your session works - e.g. normal install.packages() will work the same with and without {wayback}
  • given that no date is provided the parameter date will default to 60 days after the currently used R version’s publication date
  • {wayback} will not install anything if the required package is already found in the current path
  • if however a explicit library path is provided - best practice - than {wayback} will assume that all packages and all dependencies
    • except base R packages - should come from this source
  • dependencies are important: {wayback} will forcefully install dependencies
  • providing a function that does package loading and installation is less ‘save’ than the standard usage of library() on the other hand this is common practice and {wayback} scratches this itch in hope to provide a solid, effective and robust solution to the problem
  • behaviour should - by default - stem from function parameters only
  • to minimize re-writing function parameters over and over again all function parameters can be set via options

Other Packages and Frameworks

wayback's People

Contributors

petermeissner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wayback's Issues

Dependency installation

consider libPath like that:
c("path_a", "path_b")

| 
| - path_a
|
| - path_b
|    | - Dep
| 

than if package Dep is part of path_b and user tries to install packageMain and its dependencies into path_a Dep will not be installed!

You get:

| 
| - path_a
|    | - Main
|
| - path_b
|    | - Dep
| 

instead of:

| 
| - path_a
|    | - Main
|    | - Dep
|
| - path_b
|    | - Dep
|

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.