The libr package brings the concepts of data libraries, data dictionaries, and data steps to R. A data library is an object used to define and manage an entire directory of data files. A data dictionary is a data frame full of information about a data library, data frame, or tibble. And a data step allows row-by-row processing of data.

The functions contained in the libr package are as follows:

  • libname: Creates a data library

  • dictionary: Creates a data dictionary

  • datastep: Perform row-by-row processing of data

  • lib_load: Loads a library into the workspace

  • lib_unload: Unloads a library from the workspace

  • lib_sync: Synchronizes the workspace with the library list

  • lib_write: Writes library data to the file system

  • lib_add: Adds data to a library

  • lib_replace: Replaces data in a library

  • lib_remove: Removes data from a library

  • lib_copy: Copies a data library

  • lib_delete: Deletes a data library

  • lib_info: Returns a data frame of information about the library

  • lib_path: Returns the path of a data library

  • lib_size: Returns the size of the data library in bytes

  • import_spec: Defines an import spec for a specific file

  • specs: Contains all the import specs for a library

Note that the libr package is intended to be used with small and medium-sized data sets. It is not recommended for big data, as big data requires very careful control over which data is or is not loaded into memory. The libr package, on the other hand, tends to load all data into memory indiscriminately.