new_col_meta: Create a new 'col_meta' class object

Description Usage Arguments Value meta information See Also

View source: R/meta.R

Description

This class holds a set of meta information for a specific column and is usually stored in a file_meta class object, which is usually stored ina file_structure class object.

Usage

1
2
3
4
5
6
7
new_col_meta(
  desc = NULL,
  values = NULL,
  values_desc = NULL,
  valid_start = NULL,
  valid_end = NULL
)

Arguments

desc

An optional string holding a column description.

values

An optional vector (character/logical/numeric) usually holding the possible column values (e.g. c(1, 2)) or a more abstract text version of the column values (e.g. c("JJJJMMDD", "99999999", "")). The argument can be omitted.

values_desc

An optional character vector that corresponds to the values vector. Each entry of values_desc is a more detailed description of the corresponding entry in values. If some descriptions are not present, the entries are filled with NA. The argument can be omitted. But if values and values_desc are both present, then they have to be of the same length.

valid_start

An optional atomic argument (string or number) holding information about the first data set, in which the current variable is valid (present in the data sets). For example valid_start = 2017.

valid_end

An optional atomic argument (string or number) holding information about the last data set, in which the current variable is valid (present in the data sets). For example valid_end = Inf.

Value

A col_meta class object, holding the meta information for a specific data column.

meta information

The col_meta class objects are used in order to store some meta information about single data columns, like additional column desciptions, and column value/level descriptions. In order to store meta information about a set of columns a file_meta class object can be used. This objects store a list of col_meta class objects, where each col_meta class object corresponds to a specific column in a data set. This file_meta class objects are usually stored in file_structure class objects or file_definition class objects. But when calling read_data(), the meta information gets also appended to the resulting data.frame. The meta information stored in a file_structure, a file_definition class object or a read data.frame can be extracted by using the function get_meta(). A col_meta class object holds the following informations:

See Also

new_file_meta(), get_meta()


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