lib_unload function unloads a data library from
the workspace environment. The unload function does not delete the data
or remove the library. It simply removes the data frames from working
memory. By default, the
lib_unload function will also synchronize the
data in working memory with the data stored in the library list, as these
two instances can become out of sync if you change the data in working memory.
The data library to unload.
Whether to sync the workspace with the library list before it is unloaded. Default is TRUE. If you want to unload the workspace without saving the workspace data, set this parameter to FALSE.
The name of the library to unload, if the name is different than the variable name. Used internally.
The unloaded data library.
lib_load to load the library.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
# Create temp directory tmp <- tempdir() # Create library libname(dat, tmp) # Add data to library lib_add(dat, iris, ToothGrowth, PlantGrowth) # Load library into workspace lib_load(dat) # Examine workspace ls() #  "dat" "dat.iris" "dat.PlantGrowth" "dat.ToothGrowth" "tmp" # Use some data summary(dat.PlantGrowth) summary(dat.ToothGrowth) # Unload library lib_unload(dat) # Examine workspace again ls() #  "dat" "tmp" # Clean up lib_delete(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.