- Notifications
You must be signed in to change notification settings - Fork0
An R package allowing here() roots to be temporarily relocated
License
Unknown, MIT licenses found
Licenses found
Unknown
LICENSEMIT
LICENSE.mdNotificationsYou must be signed in to change notification settings
torbjorn/wither
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Run a block or expression temporarily under a differenthere() root.
This is useful if you need to source R code from another project forexample (as might be the case with git submodules)
You can install the development version of wither fromGitHub with:
# install.packages("pak")pak::pak("torbjorn/wither")
with_here() evaluates an expression under a temporarily different hereroot():
library(here)library(wither)was<- here()d<- tempfile()dir.create(d)# have here() be somewhere else for an expressionis_now<- with_here(d, here())stopifnot(normalizePath(was)!= normalizePath(is_now))# clean upunlink(d,recursive=TRUE)
local_here() evaluates the remainder of a block under a temporarilydifferent here root():
library(here)library(wither)was<- here()d<- tempfile()dir.create(d)local({# have here() be somewhere else for the rest of the block local_here(d)is_now<- here() stopifnot(normalizePath(was)!= normalizePath(is_now))})# clean upunlink(d,recursive=TRUE)
About
An R package allowing here() roots to be temporarily relocated
Resources
License
Unknown, MIT licenses found
Licenses found
Unknown
LICENSEMIT
LICENSE.mdUh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.