Description Usage Arguments Value Methods (by class) Author(s)
Adds a new column of a defined type to a data.frame
and initializes it to a value.
The advantage of doing this over adding it with $
or [,""]
is that the case
nrow(o) == 0
is adequately handled and doesn't raise an error.
1 2 3 4 5 6 7 | addProperty(o, name, type, value = NA)
## S4 method for signature 'RmbSpectrum2,character,character'
addProperty(o, name, type, value = NA)
## S4 method for signature 'data.frame,character,character'
addProperty(o, name, type, value = NA)
|
o |
|
name |
Name of the new column |
type |
Data type of the new column |
value |
Initial value of the new column ( |
Expanded data frame.
o = RmbSpectrum2,name = character,type = character
: Add a new column to the RmbSpectrum2 properties
o = data.frame,name = character,type = character
: Add a new column to a data.frame
stravsmi
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.