| is.survey_df | R Documentation |
Construct a survey object from a data frame or tibble by attaching survey-level metadata such as an identifier, source filename, and basic dataset-level descriptive metadata.
is.survey_df(x)
survey_df(
x,
title = NULL,
creator = person("Unknown", "Creator"),
dataset_bibentry = NULL,
dataset_subject = NULL,
identifier,
filename
)
is.survey_df(x)
## S3 method for class 'survey_df'
print(x, ...)
x |
A data frame or tibble containing the survey data. |
title |
Optional title for the survey. Defaults to '"Untitled Survey"'. |
creator |
A [utils::person()] object describing the dataset creator. Defaults to 'person("Unknown", "Creator")'. |
dataset_bibentry |
Optional dataset-level bibliographic metadata. If 'NULL', a minimal DataCite entry is created automatically using 'title', 'creator', and 'dataset_subject'. |
dataset_subject |
Dataset subject metadata. If 'NULL', defaults to the Library of Congress Subject Heading Surveys. |
identifier |
A character scalar identifying the survey. |
filename |
A character scalar giving the source filename, or 'NULL' if unknown. |
... |
potentially further arguments for methods. |
This function is primarily intended for use by import helpers such as [read_rds()], [read_spss()], [read_dta()], and [read_csv()]. Most users will not need to call it directly.
An object of class '"survey_df"', which is a data frame with additional survey-level metadata stored as attributes and dataset-level metadata stored using the 'dataset' package.
[read_survey()] for importing survey data from external files.
Other importing functions:
survey()
survey_df(
x = data.frame(
rowid = 1:6,
observations = runif(6)
),
identifier = "example",
filename = "no_file"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.