setFormat {tabshiftr}R Documentation

Set the specific format of a table

Description

Any table makes some assumptions about the data, but they are mostly not explicitly recorded in the commonly available table format. This concerns, for example, the symbol(s) that signal "not available" values or the symbol that is used as decimal sign.

Usage

setFormat(
  schema = NULL,
  decimal = NULL,
  thousand = NULL,
  na_values = NULL,
  flags = NULL
)

Arguments

schema

[schema(1)]
In case this information is added to an already existing schema, provide that schema here (overwrites previous information).

decimal

[character(1)]
The symbols that should be interpreted as decimal separator.

thousand

[character(1)]
The symbols that should be interpreted as thousand separator.

na_values

[character(.)]
The symbols that should be interpreted as NA.

flags

[data.frame(2)]
The typically character based flags that should be shaved off of observed variables to make them identifiable as numeric values. This must be a data.frame with two columns with names flag and value.

Details

Please also take a look at the currently suggested strategy to set up a schema description.

Value

An object of class schema.

See Also

Other functions to describe table arrangement: setCluster(), setFilter(), setGroups(), setIDVar(), setObsVar()

Examples

# please check the vignette for examples

[Package tabshiftr version 0.4.1 Index]