lib_info: Get Information about a Data Library

View source: R/libname.R

lib_infoR Documentation

Get Information about a Data Library

Description

The lib_info function returns a data frame of information about each item in the data library. That information includes the item name, file extension, number of rows, number of columns, size in bytes, and the last modified date.

Usage

lib_info(x)

Arguments

x

The data library.

Value

A data frame of information about the library.

See Also

Other lib: is.lib(), lib_add(), lib_copy(), lib_delete(), lib_export(), lib_load(), lib_path(), lib_remove(), lib_replace(), lib_size(), lib_sync(), lib_unload(), lib_write(), libname(), print.lib()

Examples

# Create temp directory
tmp <- tempdir()

# Create data library
libname(dat, tmp)

# Add data to library
lib_add(dat, trees, rock, beaver1)

# Get library information
info <- lib_info(dat)

# Examine info
info
#      Name Extension Rows Cols   Size        LastModified
# 1 beaver1       rds  114    4 5.3 Kb 2020-11-05 21:27:57
# 2   rocks       rds   48    4 3.1 Kb 2020-11-05 21:27:56
# 3   trees       rds   31    3 2.4 Kb 2020-11-05 21:27:56

# Clean up
lib_delete(dat)

libr documentation built on Nov. 18, 2023, 1:08 a.m.