Learn R Programming

onsr (version 1.0.2)

ons_extra: Access dataset's additional information

Description

Data in each version is broken down by dimensions, and a unique combination of dimension options in a version can be used to retrieve observation level data.

Usage

ons_dim(id = NULL, edition = NULL, version = NULL)

ons_dim_opts( id = NULL, edition = NULL, version = NULL, dimension = NULL, limit = NULL, offset = NULL )

ons_meta(id = NULL, edition = NULL, version = NULL)

Value

A character vector.

Arguments

id

[character] Id that represents a dataset.

edition

[character] A subset of the dataset representing a specific time period. For some datasets this edition can contain all time periods (all historical data). The latest version of this is displayed by default.

version

[character] A specific instance of the edition at a point in time. New versions can be published as a result of corrections, revisions or new data becoming available.

dimension

[character]

limit

[numeric(1): NULL] Number of records to return. By default is NULL, which means that the defaults of the ONS API are used. You can set it to a number to request more (or less) records, and also to Inf to request all records.

offset

[numeric(1): NULL] The position in the dataset of a particular record. By specifying offset , you retrieve a subset of records starting with the offset value. Offset normally works with length , which determines how many records to retrieve starting from the offset.

Examples

Run this code
if (FALSE) {
ons_dim(id = "cpih01")

ons_dim_opts(id = "cpih01", dimension = "time")

ons_meta(id = "cpih01")
}

Run the code above in your browser using DataLab