mvl_group_lapply | R Documentation |
Iteratively call function fn(idx)
over index stretches previously computed with mvl_group
mvl_group_lapply(G, fn)
G |
a list of groups and group stretches produced by |
fn |
a function of one argument - list of indices |
a list of results of function fn
mvl_group
## Not run:
Mtmp<-mvl_open("tmp_a.mvl", append=TRUE, create=TRUE)
mvl_write_object(Mtmp, data.frame(x=rep(c("a", "b"), 50), y=(1:100)/5), "df1")
Mtmp<-mvl_remap(Mtmp)
df1<-Mtmp$df1
G<-mvl_group(list(df1[,"x",ref=TRUE], df1[,"y", ref=TRUE]))
mvl_group_lapply(G, function(idx) { return(sum(df1[idx, "y"]))})
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.