lib_size: Get the Size of a Data Library

Description Usage Arguments Value See Also Examples

View source: R/libname.R

Description

The lib_size function returns the number of bytes used by the data library, as stored on disk.

Usage

1

Arguments

x

The data library.

Value

The size of the data library in bytes as stored on the file system.

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Create temp directory
tmp <- tempdir()

# Create library
libname(dat, tmp)

# Add some data to library
lib_add(dat, mtcars)
lib_add(dat, iris)

# Check size of library
lib_size(dat)
# [1] 9757

# Clean up
lib_delete(dat)

libr documentation built on Oct. 10, 2021, 1:07 a.m.