Import a survey from a csv file.
Arguments
- 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
dataset::dublincoreordataset::datacite.- ...
Further optional parameters to pass on to
utils::read.csv.
See also
Other import functions:
harmonize_survey_variables(),
pull_survey(),
read_dta(),
read_rds(),
read_spss(),
read_surveys()
Examples
# 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 = FALSE)
# Read the CSV file:
re_read <- read_csv(
file = test_csv_file,
id = "ZA7576",
doi = "test_doi"
)
