csv_reader: Read the CSV-data for a Data Resource

View source: R/csv_reader.R

csv_readerR Documentation

Read the CSV-data for a Data Resource

Description

Read the CSV-data for a Data Resource

Usage

csv_reader(
  path,
  resource,
  use_fread = FALSE,
  to_factor = FALSE,
  as_connection = FALSE,
  ...
)

Arguments

path

path to the data set.

resource

a Data Resource.

use_fread

use the fread function instead of read.csv and return a data.table.

to_factor

convert columns to factor if the schema has a categories field for the column. Passed on to dpapplyschema.

as_connection

This argument is ignored. The function will always return a data.frame.

...

additional arguments are passed on to read.csv or fread. Note that some arguments are already set by csv_reader, so not all arguments are available to use as additional arguments.

Value

Returns a data.frame with the data.

See Also

Generally used by calling dpgetdata.


djvanderlaan/datapackage documentation built on March 18, 2024, 4:57 p.m.