Allows to join new discrete/categorical variables that can be referred to via the across-argument of many functions.

addClusterVariables(
  object,
  input_df,
  variable_names,
  phase = NULL,
  overwrite = FALSE,
  by = "cell_id",
  verbose = TRUE
)

addMetaVariables(
  object,
  input_df,
  variable_names,
  phase = NULL,
  overwrite = FALSE,
  with_well_plate = FALSE,
  by = "cell_id",
  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.

overwrite

Logical value. Must be set to TRUE in case of overlapping variable names.

(Note that overwriting stat variables leads to all analysis progress of affected variable sets being discarded.)

by

Character value. Denotes the variable by which the new informational variables specified in argument variable_names are supposed to be joined. In case of addClusterVariables() and addMetaVariables() this does not have to be 'cell_id'.

E.g. if you want to add additional grouping options that refer to the conditions such as 'mechanism_of_action' again grouping the conditions you can specify by = 'condition'.

verbose

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

(Warning messages will always be printed.)

Value

An updated cypro object that contains the data added.