A class-specific instance of the print
function for
data libraries. The function prints the library in a summary manner.
Use verbose = TRUE
to print the library as a list.
# S3 method for class 'lib'
print(x, ..., verbose = FALSE)
The object, invisibly.
Other lib:
is.lib()
,
lib_add()
,
lib_copy()
,
lib_delete()
,
lib_export()
,
lib_info()
,
lib_load()
,
lib_path()
,
lib_remove()
,
lib_replace()
,
lib_size()
,
lib_sync()
,
lib_unload()
,
lib_write()
,
libname()
# Create temp directory
tmp <- tempdir()
# Create data library
libname(dat, tmp)
# Add data to library
lib_add(dat, iris, ToothGrowth, PlantGrowth)
# Print library summary
print(dat)
# library 'dat': 3 items
# - attributes: not loaded
# - path: C:\Users\User\AppData\Local\Temp\RtmpCSJ6Gc
# - items:
# Name Extension Rows Cols Size LastModified
# 1 iris rds 150 5 7.8 Kb 2020-11-05 22:26:59
# 2 PlantGrowth rds 30 2 2.5 Kb 2020-11-05 22:26:59
# 3 ToothGrowth rds 60 3 3.4 Kb 2020-11-05 22:26:59
# Clean up
lib_delete(dat)