read_csv | R Documentation |
Import a survey from a csv file.
read_csv(file, id = NULL, doi = NULL, dataset_bibentry = NULL, ...)
file |
A path to a file to import. |
id |
An identifier of the tibble, if omitted, defaults to the file name without its extension. |
doi |
An optional document object identifier. |
dataset_bibentry |
A bibliographic entry created with
|
... |
Further optional parameters to pass on to
|
A tibble, data frame variant with survey attributes.
Other import functions:
pull_survey()
,
read_dta()
,
read_rds()
,
read_spss()
,
read_surveys()
# Create a temporary CSV file:
path <- system.file("examples", "ZA7576.rds", package = "retroharmonize")
read_survey <- read_rds(path)
test_csv_file <- tempfile()
write.csv(x = read_survey, file = test_csv_file, row.names = F)
# Create a Bibentry:
survey_bibentry <- dublincore(
title = "Test Survey",
creator = person("Jane", "Doe", role = "cre")
)
# Read the CSV file:
re_read <- read_csv(
file=test_csv_file,
dataset_bibentry = survey_bibentry,
id = "ZA7576", doi = "test_doi")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.