Learn R Programming

datapackage (version 0.2.1)

csv_reader: 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,
  convert_categories = c("no", "to_factor"),
  as_connection = FALSE,
  ...
)

Value

Returns a data.frame with the data.

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.

convert_categories

how to handle columns for which the field descriptor has a categories property. Passed on to dp_apply_schema.

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.

See Also

Generally used by calling dp_get_data.