new_adapters: Create a new 'adapters' class object

Description Usage Arguments Value adapters See Also

View source: R/adapters.R

Description

This class holds a list of adapter functions and their function description and is usually stored inside of a file_definition or a file_structure class object.

Usage

1
new_adapters(..., description = NULL)

Arguments

...

Either single list argument is passed to new_adapters() (e.g. new_adapters(list(fun1, fun2, ...))), where each list argument is an adapter function, or multiple functions are directly passed to new_adapters() (e.g. new_adapters(fun1, fun2, ...)).

description

An optional character vector that must have the same length as the number of passed in adapter functions. If omitted then non-standard-evaluation will be used in order to capture the function name if possible. If a passed in function is not stored with a function name, then NA_character_ will be used instead.

Value

An adapters class object, holding a list of adapter functions and their descriptions.

adapters

An adapter function is a function that takes a data.frame as input argument and returns a modified version of this data.frame. The adapter functions are stored in an adapters class object, which is a special list that contains all adapter functions and a description text of each function. This class objects can be created by using the function new_adapters(). The adapters class objects can be added to a file_structure or a file_definition or a file_collection class object. After reading a data file (by calling read_data(file_definition)) all adapter functions listed in the adapters argument of the file_definition]new_file_definition() class object will be applied consecutively to the loaded data set. Adapter functions can be added to an existing file_structure or a file_definition or a file_collection class object by using the function add_adapters(). Adapter functions can be used for several tasks:

See Also

add_adapters(), apply_adapters()


a-maldet/readall documentation built on Dec. 18, 2021, 9:23 p.m.