View source: R/class-general.R
getColumnValueOrNot | R Documentation |
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.
getColumnValueOrNot(data, value, prefix = "X")
data |
A data.frame or similar object |
value |
A character string giving the name of a column in the |
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.) |
A list with elements named "data", "name" giving the data
with a
column named "name" with the value in that column.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.