Adds a new ml.data.frame field as a ml.col.def-class

Description

The fields only exists within the object and are not created at the database side.

Usage

1
2
## S4 replacement method for signature 'ml.data.frame'
x$name <- value

Arguments

x

A ml.data.frame object

name

Name of the new field

value

The value for the new field. Typical a expression

Value

ml.col.def-class object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
 library(rfml)
 locConn <- ml.connect()
 # create a ml.data.frame based on the iris data set
 mlIris <- as.ml.data.frame(locConn, iris, "iris")
 # create a field based on an existing
 mlIris$newField <- mlIris$Petal.Width
 # create a field based calculation on existing
 mlIris$newField2 <- mlIris$Petal.Width + mlIris$Petal.Length
 # create a field based on an previous created
 mlIris$newField3 <- mlIris$Petal.Width + 10
 mlIris$abs_width <- abs(mlIris$Petal.Width)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.