add_index | R Documentation |
add_index(data, cols, newcol = NULL, cols.reverse, clean = TRUE)
data |
A dataframe. |
cols |
A tidy selection of item columns. |
newcol |
Name of the index as a character value. Set to NULL (default) to automatically build a name from the common column prefix, prefixed with "idx_". |
cols.reverse |
A tidy selection of columns with reversed codings. |
clean |
Prepare data by data_clean. |
The input tibble with an additional column that contains the index values. The column contains the result of the alpha calculation in the attribute named "psych.alpha".
ds <- volker::chatgpt
volker::add_index(ds, starts_with("cg_adoption"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.