New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standard set of with functions #89

Closed
hadley opened this Issue Apr 27, 2012 · 0 comments

Comments

Projects
None yet
1 participant
@hadley
Member

hadley commented Apr 27, 2012

with_something <- function(get, set) {
  function(new, code) { 
    old <- get()
    set(new)
    on.exit(set(old))
    force(code)
  }  
}

with_locale
with_env
with_libpaths
with_options
with_par
in_dir

@hadley hadley closed this in 8f0f18f May 9, 2012

@lock lock bot locked and limited conversation to collaborators Sep 19, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.