R/with_dir.R

with_dir <- function (new, code) 
{
    old <- setwd(dir = new)
    on.exit(setwd(old))
    force(code)
}

Try the AnalyzeFMRI package in your browser

Any scripts or data that you put into this service are public.

AnalyzeFMRI documentation built on Aug. 8, 2025, 7:16 p.m.