survey_df: Create a survey data frame

is.survey_dfR Documentation

Create a survey data frame

Description

Store the data of a survey in a tibble (data frame) with a unique survey identifier, import filename, and optional document object identifier.

Usage

is.survey_df(object)

survey_df(
  x,
  dataset_bibentry = NULL,
  dataset_subject = NULL,
  identifier,
  filename
)

is.survey_df(object)

## S3 method for class 'survey_df'
print(x, ...)

Arguments

x

A tibble or data frame that contains the survey data.

dataset_bibentry

A list of bibliographic references and descriptive metadata about the dataset as a whole created with dataset::datacite or dataset::dublincore.

dataset_subject

The subject of the dataset; it can be a simple character string, or a more complex object created with dataset::subject.

filename

The import file name.

id

A mandatory identifier for the survey.

Details

Whilst you can create a survey object with this helper function, it is most likely that you will receive it with an importing function, i.e. read_rds, read_spss read_dta, read_csv or their common wrapper read_survey.

Value

A dataset::dataset_df object with with id, and filename metadata information.

See Also

Other importing functions: survey()

Examples

example_survey <- survey( 
  x = data.frame ( 
    rowid = 1:6,
    observations = runif(6)), 
  id = 'example', 
  filename = "no_file"
)

antaldaniel/retroharmonize documentation built on Dec. 31, 2024, 9:52 p.m.