Allows to join numeric variables that can be referred to via the variables-argument of many functions.

addStatVariables(
  object,
  input_df,
  variable_names,
  phase = NULL,
  verbose = TRUE
)

Arguments

object

A valid cypro object.

input_df

A data.frame that contains the variables denoted in argument variable_names as well as a character variable named according to input of argument by that is used to match and join both data.frames.

variable_names

Character vector. The name of the variables that are to be joined.

phase

Character or numeric. If character, the ordinal value referring to the phase of interest (e.g. 'first', 'second' etc.). referring to the phase of interest or 'all'. If numeric, the number referring to the phase.

If set to NULL takes the phase denoted as default with adjustDefault().

Ignored if the experiment design contains only one phase.

verbose

Logical. If set to TRUE informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

stat_df

A data.frame that contains the variables denoted in argument variable_names as well as a character variable named cell_id matching the cell ids of the input object.

Value

An updated cypro object that contains the data added.