Skip to content

RyoNakagami/Renv_setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is it about?

  • Project-based renv initialization script

Renv basics

sequenceDiagram
    participant A AS system library
    participant B AS project library
    participant C AS lockfile
    participant D AS renv cache
    
    A->>B: renv::init()
    D->>B: renv::install() or renv::update()
    B->>C: renv::snapshot()
    C->>B: renv::restore()

setup

PATH設定

.zshrc or .bashrcに以下のラインを付け足し, commandのPATHを通す

% export PATH="<path>/Renv_setup:$PATH"

package_templateの設定

  • 必要なパッケージを行単位でpackage_template以下のファイルに入力する
  • 最後のラインに空行を忘れずに(parseの関係上必要)
devtools
ggplot2
languageserver
tidyverse
rmarkdown

Usage

Projectの開始

% renv_init <package-template>

Packageのinstall

## shellscript
% Rscript -e "renv::install('MASS')"

## package install via R
renv::install('MASS')

## from github repository
renv::install("eddelbuettel/digest")

## update packages
renv::update()

Packageのremove

# remove digest from library
renv::remove("digest")

分析環境の保存

renv::snapshot()

分析環境の再現

# check library status
renv::status()

# restore lockfile, thereby reinstalling digest 0.6.19
renv::restore()

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published