csvdata: Create CsvData object from data.frame

Description Usage Arguments Details

Description

This function takes a data.frame, its metadata and a location. The function writes the data to the location and returns a CsvData object. The data.frame itself is not stored in this object.

Usage

1
2
3
csvdata(resource, dat, location, name = resource, dset.meta = NULL,
  cols.meta = NULL, update.fct = function(csv) return(data.frame()),
  verbose = TRUE, clss = "CsvData")

Arguments

resource

the name of the resource. Required.

dat

data.frame to convert to CsvData object. Required.

location

either a Location object, or a character pointing to a local directory. See details.

name

the physical name of the resource. Defaults to resource.

dset.meta

A list of metadata on the dataset.

cols.meta

A data.frame of metadata on the columns, rows are column names, columns are type, name, format

update.fct

function for updating the data. the update method and update interval is specified as meta data. Default is a function that returns an empty data.frame.

verbose

print diagnostic messages (default=TRUE)

clss

class to construct. Defaults to CsvData.

Details

If metadata is missing, it is set with sensible default values. The default values for the dataset metadata are title=<resource name>, modified=<current timestamp>, encoding='UTF-8', type='csv2', all other entries missing. The default values for column metadata are name=<column name of the data.frame>, type=<class(column)>, format='

No updating takes place here.


datamart documentation built on May 2, 2019, 9:40 a.m.