Identifying variables are those variables that describe the (qualitative) properties that make each observation (as described by the observed variables) unique.

setIDVar(
  schema = NULL,
  name = NULL,
  type = "character",
  value = NULL,
  columns = NULL,
  rows = NULL,
  split = NULL,
  merge = NULL,
  distinct = FALSE
)

Arguments

schema

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

name

[character(1)]
Name of the new identifying variable.

type

[character(1)]
data type of the new identifying variable. Possible values are "c/character", "i/integer", "n/numeric", "l/logical", "D/Date" or "_/skip". For "D/Date", the value has to follow the form YYYY-MM-DD, where dates that don't match that are replaced by NA.

value

[character(1)]
In case the variable is an implicit variable (i.e., which is not in the origin table), specify it here.

columns

[integerish(.)]
The column(s) in which the values of the new variable are recorded.

rows

[integerish(.)]
In case the variable is in several columns, specify here additionally the row in which the names are recorded.

split

[character(1)]
In case the variable is part of a compound value, this should be a regular expression that splits the respective value off of that compound value. See extract on how to set up the regular expression.

merge

[character(1)]
In case a variable is made up of several columns, this should be the character string that would connect the two columns (e.g., an empty space " ").

distinct

[logical(1)]
whether or not the variable is distinct from a cluster. This is the case when the variable is not systematically available for all clusters and thus needs to be registered separately from clusters.

Value

An object of class schema.

Details

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

See also

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

Examples

# please check the vignette for examples