Learn R Programming

variables (version 1.1-1)

vars: Multiple Abstract Descriptions

Description

Concatenate or generate multiple variable descriptions

Usage

# S3 method for var
c(...)
as.vars(object)

Arguments

object

an object

a list of variable objects

Details

c() can be used to concatenate multiple variable objects; the corresponding generics also work for the resulting object. as.vars() tries to infer a formal description from data.

Examples

Run this code
# NOT RUN {
   f <- factor_var("x", levels = LETTERS[1:3])
   n <- numeric_var("y")

   fn <- c(f, n)
   variable.names(fn)
   support(fn)
   is.bounded(fn)
   mkgrid(fn, n = 9)

   as.vars(iris)
# }

Run the code above in your browser using DataLab