Learn R Programming

Dasst (version 0.3.4)

compute<-: Compute within columns from an object of class '>Dasst.

Description

compute<- computes an expression using the columns of the object of class '>Dasst.

Arguments

x

An object of class '>Dasst.

cocol

A character string. The name of the new column field.

value

A character string. An expression to compute within column fields.

Value

The actual object of class '>Dasst.

Details

This method computes an expression taking the values recorded on each column field used in the expression belonging to the object of class '>Dasst. The result is stored as a new column table.

So far, the new column will not be saved if the write method is invoked.

Examples

Run this code
# NOT RUN {
data(plantGrowth)
compute(plantGrowth, "date_YEAR_DOY") <-
 "as.Date(paste(YEAR, DOY, sep=\"\"), format=\"%Y%j\")"
# }

Run the code above in your browser using DataLab