Learn R Programming

crunch (version 1.9.4)

VariableDefinition: Construct a variable definition with (optional) additional metadata

Description

Construct a variable definition with (optional) additional metadata

Usage

VariableDefinition(data, ...)

VarDef(data, ...)

Arguments

data
an R vector of data to convert to the Crunch payload format. See code{toVariable} for how R types are converted. If data is not supplied, you may instead supply values, which will not be con
...
additional metadata attributes to send.

Value

  • a VariableDefinition object, ready to POST to Crunch.

See Also

toVariable

Examples

Run this code
VariableDefinition(rnorm(5), name="Some numbers",
    description="Generated pseudorandomly from the normal distribution")
VarDef(name="Integers", values=1:5, type="numeric",
    description="When creating variable definitions with 'values', you must
    specify 'type', and categorical variables will require 'categories'.")

Run the code above in your browser using DataLab