dp_categorieslist: Get the a data.frame with the categories for a variable.

View source: R/dp_categorieslist.R

dp_categorieslistR Documentation

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

Description

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

Usage

dp_categorieslist(x, ...)

## Default S3 method:
dp_categorieslist(
  x,
  fielddescriptor = attr(x, "fielddescriptor"),
  datapackage = dp_get_datapackage(fielddescriptor),
  ...
)

## S3 method for class 'fielddescriptor'
dp_categorieslist(
  x,
  datapackage = dp_get_datapackage(x),
  normalised = FALSE,
  ...
)

Arguments

x

the variable for which to get the Categories List

...

used to pass extra arguments on to other methods.

fielddescriptor

the Field Descriptor associated with the variable.

datapackage

the Data Package where the variable is from.

normalised

if TRUE the column with values will be named value and the the columnd with labels label.

Value

Returns a data.frame with the categories or NULL when none could be found.


djvanderlaan/datapackage documentation built on June 12, 2025, 2:44 a.m.