Displaying 1 result from an estimated 1 matches for "etbl".
Did you mean:
embl
2011 Jul 01
4
Access only part of last dimension of table/matrix
I would like to do some operations inside a function using only one
value for the last dimension of a table/matrix:
tabfn <- function (dfrm, facvec, YN ="event"){
return( Etbl <- do.call(table, dfrm[ , c(facvec,
"event") ]) )
# just want Etbl[,,,"TRUE"] or Etbl[,, "TRUE"] or
Etbl[,"TRUE"]
}
tbl <- tabfn(testdf, c("x", "y") )
tbl # all value of event returned
At the...