View source: R/ls_apply_script_bits.R
ls_apply_script_bits | R Documentation |
This function applies specific code bits from the LimeSurvey data
import R script, read by ls_parse_data_import_script()
, for example
to update variable names, set labels, etc.
ls_apply_script_bits(
data,
scriptBits,
setVarNames = TRUE,
setLabels = TRUE,
convertToCharacter = FALSE,
convertToFactor = FALSE,
categoricalQuestions = NULL,
massConvertToNumeric = TRUE,
silent = limonaid::opts$get("silent"),
sticky = limonaid::opts$get("sticky")
)
data |
The dataframe. |
scriptBits |
The object returned by the call
to |
setVarNames , setLabels , convertToCharacter , convertToFactor |
Whether to set variable names or labels, or convert to character or factor, using the code isolated using the specified regular expression. |
categoricalQuestions |
Which variables (specified using LimeSurvey variable names) are considered categorical questions; for these, the script to convert the variables to factors, as extracted from the LimeSurvey import file, is applied. |
massConvertToNumeric |
Whether to convert all variables to numeric
using |
silent |
Whether to be silent or verbose ('chatty'). |
sticky |
Whether to make labels sticky (requires the |
The dataframe.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.