Skip to content

wither

Temporarily Change Project Root

v0.1.0 · Sep 12, 2024 · MIT + file LICENSE

Description

Lets you temporarily execute an expression or a local block with a different here() root in the 'here' package. This is useful for sourcing code in other projects which expect the root directory of here() to be the project directory of those projects. This may be the case with git submodules for example.

Downloads

110

Last 30 days

23250th

110

Last 90 days

110

Last year

CRAN Check Status

1 ERROR
13 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 ERROR
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (14 non-OK)
OK r-devel-linux-x86_64-debian-clang

*


            
OK r-devel-linux-x86_64-debian-gcc

*


            
OK r-devel-linux-x86_64-fedora-clang

*


            
OK r-devel-linux-x86_64-fedora-gcc

*


            
ERROR r-devel-macos-arm64

examples

Running examples in ‘wither-Ex.R’ failed
The error most likely occurred in:

> ### Name: with_here
> ### Title: Temporarily Change Project Root
> ### Aliases: with_here local_here
> 
> ### ** Examples
> 
> library(here)
here() starts at /Volumes/Builds/packages
> library(withr)
> 
> d <- local_tempdir()
> 
> cat("here() is initially:", here(), "\n")
here() is initially: /Volumes/Builds/packages 
> 
> # temporarily do things uner a different here() root:
> with_here(d, cat("but here() is now:", here(), "\n"))

Execution halted
Ran 1/1 deferred expressions
OK r-devel-windows-x86_64

*


            
OK r-oldrel-macos-arm64

*


            
OK r-oldrel-macos-x86_64

*


            
OK r-oldrel-windows-x86_64

*


            
OK r-patched-linux-x86_64

*


            
OK r-release-linux-x86_64

*


            
OK r-release-macos-arm64

*


            
OK r-release-macos-x86_64

*


            
OK r-release-windows-x86_64

*


            

Check History

ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 9, 2026
ERROR r-devel-macos-arm64

examples

Running examples in ‘wither-Ex.R’ failed
The error most likely occurred in:

> ### Name: with_here
> ### Title: Temporarily Change Project Root
> ### Aliases: with_here local_here
> 
> ### ** Examples
> 
> library(here)
here() starts at /Volumes/Builds/packages
> library(withr)
> 
> d <- local_tempdir()
> 
> cat("here() is initially:", here(), "\n")
here() is initially: /Volumes/Builds/packages 
> 
> # temporarily do things uner a different here() root:
> with_here(d, cat("but here() is now:", h

Dependency Network

Dependencies Reverse dependencies fs here withr wither

Version History

new 0.1.0 Mar 9, 2026