setCluster: Set where the clusters are

View source: R/setClusters.R

setClusterR Documentation

Set where the clusters are

Description

There is hardly any limit to how data can be arranged in a spreadsheet, apart from the apparent organisation into a lattice of cells. However, it is often the case that data are gathered into topologically coherent chunks. Those chunks are what is called 'cluster' in tabshiftr.

Usage

setCluster(
  schema = NULL,
  id = NULL,
  group = NULL,
  member = NULL,
  left = NULL,
  top = NULL,
  width = NULL,
  height = NULL
)

Arguments

schema

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

id

[character(1)]
When data are clustered, it is typically the case that the data are segregated according to a categorical variables of interest. In such cases, this variable needs to be registered as cluster ID.

group

[character(1)]
When clusters themselves are clustered, they are typically nested into another categorical variable, which needs to be registered as group ID.

member

[integerish(.)]
For each cluster, specify here to which group it belongs. Clusters are enumerated from left to right and from top to bottom.

left

[integerish(.)]
The horizontal cell value of the top-left cell of each cluster. This can also be a vector of values in case there are several clusters.

top

[integerish(.)]
The vertical cell values of the top-left cell of each cluster. This can also be a vector of values in case there are several clusters.

width

[integerish(.)]
The width of each cluster in cells. This can also be a vector of values in case there are several clusters.

height

[integerish(.)]
The height of each cluster in cells. This can also be a vector of values in case there are several clusters.

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: setFilter(), setFormat(), setGroups(), setIDVar(), setObsVar()

Examples

# please check the vignette for examples

tabshiftr documentation built on Feb. 16, 2023, 10:24 p.m.