PrepareForCbind: Helps tidy Q variables and tables

View source: R/preparedata.R

PrepareForCbindR Documentation

Helps tidy Q variables and tables

Description

Inputs supplied via input.data.raw can be in a range of formats. This function does a minimal job of checking for attribute and using these as names when appropriate. Currently, it does two functions. (1) Returns the span instead of the values and (2) assigns column names to 1-dimensional Q tables. Inputs which cannot be safely converted to a matrix (e.g. date/time or factors) are returned as is without any changes.

Usage

PrepareForCbind(
  x,
  use.span = FALSE,
  show.labels = TRUE,
  is.scatter.annot.data = FALSE
)

Arguments

x

Q table or variable

use.span

Logical; Whether the span categories should be returned instead of the values in the table. Row names will be preserved. A warning will be given if this option is selected but no span attribute is found in x.

show.labels

This option is only relevant for Q variables. For tables, the resulting variable will always be named by by the 'name' attribute, but for variables both the 'label' and 'name' attribute can be used.

is.scatter.annot.data

This condition is applied to input data expected to be used for annotation data for scatterplots. it checks that the data is one-dimensional and stops immediately and gives an error if this condition is not met. This avoid some nonsense output or misleading error messages that might be given by PrepareData.


Displayr/flipChart documentation built on Sept. 20, 2024, 10:56 a.m.