Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

variables

Access a catalog of variables


Description

Datasets contain collections of variables. For some purposes, such as editing variables' metadata, it is helpful to access these variable catalogs more directly. Other objects, such as cubes and folders, also define variables() methods that expose variable metadata.

Usage

variables(x)

variables(x) <- value

allVariables(x)

allVariables(x) <- value

## S4 method for signature 'CubeDims'
variables(x)

## S4 method for signature 'CrunchCube'
variables(x)

## S4 method for signature 'CrunchDataset'
variables(x)

## S4 replacement method for signature 'CrunchDataset,VariableCatalog'
variables(x) <- value

## S4 method for signature 'CrunchDataset'
allVariables(x)

## S4 replacement method for signature 'CrunchDataset,VariableCatalog'
allVariables(x) <- value

## S4 method for signature 'SearchResults'
variables(x)

## S4 method for signature 'VariableFolder'
variables(x)

Arguments

x

a Dataset

value

For the setters, a VariableCatalog to assign.

Details

For datasets, variables() returns only the active variables in the dataset, while allVariables() returns all variables, including hidden variables. allVariables() is not defined for other objects.

Value

All methods return a VariableCatalog except the VariableFolder method, which returns a subset of x containing only variable references. Assignment functions return x with the changes made.


crunch

Crunch.io Data Tools

v1.28.0
LGPL (>= 3)
Authors
Greg Freedman Ellis [aut, cre], Jonathan Keane [aut], Mike Malecki [aut], Neal Richardson [aut], Gordon Shotwell [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.