Learn R Programming

crunch (version 1.3.2)

type: Change the type of Crunch variables

Description

Numeric, text, and categorical variables can be cast to one another by assigning them a new "type". This modifes the storage of the data on the server and should only be done in narrow circumstances, as in when importing data from a different file format has resulted in incorrect types being specified.

Usage

## S3 method for class 'CrunchVariable':
type(x)

## S3 method for class 'CrunchVariable': type(x) <- value

Arguments

x
a Variable
value
For the setter, a character value in c("numeric", "text", "categorical")

Value

  • Getter returns character; setter returns x duly modified.