Description Usage Arguments Structure/naming convention for mm Note Author(s) Examples
Second step in creating a survey that can be used with generate_report.
The function accepts a data.frame as input, but columns must be correctly named
or be dropped (see description below). If no model is provided (mm = NULL),
add_mm will generate a suggestion based on the data.
1 2 3 4 5 6 |
srv |
A survey object. |
mm |
Optional: Specify a |
mmlatentA column describing special significance of variables, such as latent association, complaints and so forth.
manifestThe name of variables/columns in the data.
questionQuestions as posed during interviews. Used
for printed values in generate_report.
typeThe type of variable in the data. Either character,
factor, numeric, or scale. If type is specified as factor,
the values (see below) will be used to create ordered factors.
valuesOptional: Possible values (factor levels) for variables
in the data. If type is scale, values are the outer points (1 and 10),
and an optional "do not know".
A structure and naming convention is also required for the survey itself, see
help(survey) for information.
For smaller surveys, using this function without specifiying a model might not show all possible values for factor variables etc.
Kristian D. Olsen
1 2 | x <- survey(data.frame("test" = 1, stringsAsFactors = FALSE))
x %>% add_mm()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.