load_filtered | R Documentation |
load()
that allows excluding specific namesIf you want to load every object in an R data file except for a specific set of variable names that you wish to exclude, this function makes it easy to do so.
load_filtered(file, envir = parent.frame(), ..., exclude = NULL)
file, envir, ... |
These arguments have the same meaning as in
|
exclude |
Character vector of variable names not to load. |
load()
x <- 5 y <- 3 datafile <- tempfile(fileext = ".rda") # Only saves y, not x save.image(datafile) # Set new values which can be overridden by loading the old ones. x <- 10 y <- 10 load_filtered(datafile, exclude = "x") # x is still 10, but y is now 3 again mget(c("x", "y"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.