Description Usage Arguments Structure/naming convention for list Note Author(s) Examples
First step in creating a survey that can be used with generate_report.
The function accepts either a list or a data.frame as input, and
will only retain information following the structure and naming convention.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
x |
A list or a data.frame |
listdfThe dataset from the current study, either in it's processed or raw
format. (Alias: data).
cdOptional: A dataset to compare or contrast the current study to.
Typically used when comparing a smaller (web) study to the national study.
(Alias: contrast data).
hdOptional: Historical data used to compare the present study against.
(Alias: historical data).
entsData regarding the entities (typically Q1), and their
respecitve marketshares etc. (Alias: entities).
mmThe measurement model (questionnaire) and additional information
describing the variables in the data. (Alias: measurement model).
cfgConfig for the study and generate_report, including
translations/printed names for latent variables. (Alias: config).
A structure and naming convention is also required for the measurement model,
entities and config. See add_model, add_entities and
add_config for information.
When using write_data with a survey object, all names will
be converted to their longer versions (alias). E.g. "df" becomes "data" and so forth.
Conversely, when converting a list to survey with survey or
as.survey, long names are converted to their short version. This is
done for brevity when coding.
Kristian D. Olsen
1 | x <- survey(data.frame("test" = 1, stringsAsFactors = FALSE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.