Description Usage Arguments Structure/naming convention for ents Note Author(s) Examples
Third 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 data is provided (entities = NULL),
add_entities will generate a suggestion based on the data.
1 2 3 4 5 6 | add_entities(srv, entities = NULL)
get_marketshare(srv, ent = NULL)
## S3 method for class 'survey_ents'
print(ents, width = getOption("width"))
|
srv |
A survey object. |
entity |
Optional: Specify a |
entsentityList of names for mainentity found in the data.
nThe number of rows/observations per entity.
marketshareThe marketshare associated with each entity.
This is used by add_weigts when calculating weights.
otherSpecifies whether the entity should be collected among "other" entities. I.e., when it is too small to publish and should be excluded from reports.
A structure and naming convention is also required for the survey itself, see
help(survey) for information.
This function requires that mainentity is specified in the measurement model.
See set_association for more information.
Kristian D. Olsen
1 2 | x <- survey(data.frame("test" = 1, stringsAsFactors = FALSE))
x %>% add_mm() %>% add_entities()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.