Get the value from a column in a data frame if the value is a column there, otherwise, the value should be a scalar or the length of the data.
Source:R/class-general.R
getColumnValueOrNot.Rd
Get the value from a column in a data frame if the value is a column there, otherwise, the value should be a scalar or the length of the data.
Arguments
- data
A data.frame or similar object
- value
A character string giving the name of a column in the
data
, a scalar, or a vector the same length as thedata
- prefix
The prefix to use if a column must be added (it will be used as the full column name if it is not already in the dataset or it will be prepended to the maximum column name if not.)