add_adapters: Add an adapter functions to an adapters or a pecification or...

Description Usage Arguments Value adapters

View source: R/adapters.R

Description

Add an adapter functions to an adapters or a pecification or a file_definition or a file_collection class object

Usage

1
add_adapters(obj, adapters)

Arguments

obj

This argument can be various different things:

  • An adapters class object. Then the adapters will be appended to this object.

  • An file_structure class object. Then the adapters will be appended to the obj$adapters attribute of the class.

  • An file_collection class object. Then the adapters will be appended to each file_definition object in the list.

adapters

An adapters class object, which holds all adapter functions and their descriptions. This class object can be created by using the function new_adapters().

Value

The modified object

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:


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