View source: R/add_name_to_statistics.R
| add_name_to_statistics | R Documentation | 
add a column to a data.frame x with value name as character. Helper Function. Not intended to be called by the user.
add_name_to_statistics(x, name, ...)
## S3 method for class 'list'
add_name_to_statistics(x, name, ...)
## S3 method for class 'data.frame'
add_name_to_statistics(
  x,
  name,
  colname_for_variable = atable_options("colname_for_variable"),
  ...
)
| x | an object | 
| name | a value | 
| ... | passed to methods | 
| colname_for_variable | a character length 1. Default is defined in atable_options | 
checks if the new field already exists
x now with new field colname_for_variable
add_name_to_statistics(list): apply add_name_to_statistics to all field of the list
add_name_to_statistics(data.frame): add field colname_for_variable to the data.frame. chekc for a name clash as this field as there are many user-defined fields
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.