Description Usage Arguments Author(s) See Also Examples
An object of class "expr.frame" is a data.frame with an attribute
exprlist
containing a named list of quoted expressions. The
evaluation of these expressions are columns of the data frame.
1 2 3 4 | expr.frame(x, exprlist)
exprlist(x)
|
x |
Object of class "expr.frame". |
exprlist |
a named list of quoted expressions. |
Robert Sams robert@sanctumfi.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | d <- spx[1:10,]
## exprlist assigment creates 'expr.frame' object
d <- expr.frame(d, list(RoR=quote(c(1, Close[-1] / Close[-length(Close)]))))
class(d); d
## We can now add/modify with the $ assignment method instead
d$Rtn <- quote(RoR - 1)
d$Close <- d$Close * 1.01
## d$RoR <- quote(ror(Close, delta=1/Close)) ## !!! Why Error? !!!
exprlist(d); d
## Retreive original data
coredata(d)
## Coercion
as.data.frame(d)
as.list(d)
as.matrix(d)
as.zoo(d, order.by=rownames(d))
## Subsetting
d[1:2]
d$ror
## d[, 1:7] ## !!! FIX ME !!!
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.