View source: R/dict_generate.R
dict_generate | R Documentation |
Generate a variable dictionary for a Qualtrics survey survey
dict_generate(
surveyID,
name = c("question_name", "easy_name"),
block_pattern = NULL,
block_sep = ".",
preprocess = NULL,
split_by_block = FALSE
)
surveyID |
String. Unique ID for the survey you want to download. |
name |
String. Which type of variable names to use in the dictionary,
|
block_pattern |
Function. A function that given the name of a
survey block, returns a string to be appended to variable names
in that block.
Defaults to |
block_sep |
String. Seperator between variable names and block
prefixes returned by |
preprocess |
Function. A function that given a dataframe with the
column names as in a dictionary, does formatting for each column.
Defaults to |
split_by_block |
Logical. If |
A 'qualtdict' dataframe or a list of 'qualtdict' dataframes (depending on
split_by_block
.
## Not run:
# Create a function for \code{block_pattern}
# that returns the first three letters of a string
block_pattern <- function(x) {
substring(x, 1, 3)
}
mydict <- dict_generate("SV_4YyAHbAxpdbzacl",
name = "easy_name",
block_pattern = block_pattern,
block_sep = ".",
split_by_block = FALSE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.