read_csv: Read csv file

View source: R/read_csv.R

read_csvR Documentation

Read csv file

Description

Import a survey from a csv file.

Usage

read_csv(
  file,
  id = NULL,
  doi = NULL,
  header = FALSE,
  sep = "",
  quote = "\"'",
  dec = ".",
  numerals = c("allow.loss", "warn.loss", "no.loss"),
  na.strings = "NA",
  skip = 0,
  check.names = TRUE,
  strip.white = FALSE,
  blank.lines.skip = TRUE,
  stringsAsFactors = FALSE,
  fileEncoding = "",
  encoding = "unknown"
)

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.

Value

A tibble, data frame variant with survey attributes.

See Also

Other import functions: pull_survey(), read_dta(), read_rds(), read_spss(), read_surveys()

Examples

path <-  system.file("examples", "ZA7576.rds", package = "retroharmonize")
read_survey <- read_rds(path)
attr(read_survey, "id")
attr(read_survey, "filename")
attr(read_survey, "doi") 

antaldaniel/retroharmonize documentation built on Dec. 11, 2023, 10:49 p.m.