Learn R Programming

datapackage (version 0.2.0)

Creating and Reading Data Packages

Description

Open, read data from and modify Data Packages. Data Packages are an open standard for bundling and describing data sets (). When data is read from a Data Package care is taken to convert the data as much a possible to R appropriate data types. The package can be extended with plugins for additional data types.

Copy Link

Version

Install

install.packages('datapackage')

Version

0.2.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Jan der Laan

Last Published

March 25th, 2025

Functions in datapackage (0.2.0)

dp_get_connection

Get a connection to the data belonging to a Data Resource
dp_generate_fielddescriptor

Generate a fielddescriptor for a given variable in a dataset
dp_resource

Modifying the resources of a Data Package
dp_resource_names

Get the names of the resources in a Data Package
dp_field_names

List the fields in a Data Resource
dp_resources<-

Modify a set of Data Resources in a Data Package
dp_load_from_datapackage

Quickly read a dataset from a Data Package
dp_to_yearmonth

Convert a vector to 'yearmonth' using the specified field descriptor
dp_to_code

Recode a variable to code using the associated categories
dp_to_boolean

Convert a vector to 'boolean' using the specified field descriptor
dp_write_data

Write data of resource to file
dp_to_number

Convert a vector to 'number' using the specified field descriptor
dp_to_integer

Convert a vector to 'integer' using the specified field descriptor
new_dataresource

Create a new Data Resource
dp_nresources

Return the number of resources in a Data Package
open_datapackage

Open a data package
dp_to_factor

Recode a variable to factor using the associated categories
dp_to_string

Convert a vector to 'string' using the specified fielddescriptor
PropertiesFielddescriptor

Getting and setting properties of Data Resources
dp_to_year

Convert a vector to 'year' using the specified field descriptor
dp_to_date

Convert a vector to 'date' using the specified field descriptor
dp_to_time

Convert a vector to 'time' using the specified field descriptor
dp_to_datetime

Convert a vector to 'datetime' using the specified field descriptor
dp_save_as_datapackage

Save a dataset as a Data Package
fwf_reader

Read the FWF-data for a Data Resource
new_datapackage

Create a new Data Package
dp_get_data

Get the data belonging to a Data Resource
dp_get_datapackage

Get the Data Package associated with the object
PropertiesDatapackage

Getting and setting properties of Data Packages
PropertiesDataresource

Getting and setting properties of Data Resources
new_contributor

Creating and Adding Contributors to a Data Package
dp_check_field

Check if a vector is valid given a field descriptor
dp_check_dataresource

Check if a data set is valid given a Data Resource
dp_add_reader

Add a reader function for a specific format
dp_categorieslist

Get the a data.frame with the categories for a variable.
csv_writer

Write data of data resource to CSV-file
csv_reader

Read the CSV-data for a Data Resource
dp_field

Get the Field Descriptor associated with a certain field in a Data Resource
dp_generate_dataresource

Generate Data Resource for a dataset
dp_add_writer

Add a writer function for a specific format
dp_property

Get and set properties of Data Packages and Data Resources
dp_properties

Get a list of properties defined for the object
dp_apply_schema

Convert columns of data.frame to their correct types using table schema