Skip to content
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
Closed

Standard set of with functions #89

hadley opened this issue Apr 27, 2012 · 0 comments

Comments

@hadley
Copy link
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 as completed 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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant