# NOT RUN {
# 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()
# [1] "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()
# [1] "dat" "tmp"
# Clean up
lib_delete(dat)
# }
Run the code above in your browser using DataLab