Displaying 2 results from an estimated 2 matches for "facvec".
Did you mean:
face
2000 Jun 21
1
converting a string to an element in a function call
...el) call but not quite sure how and anova() is order
dependent so I have to step through orders anyhow.
The issue is that I pass a vector of strings to the function and want to use it
as:
update(.~.+ do.something.to.the.string(vector.argument.of.strings[i])
or in the code below
update(.~.+unknown(facvec[i]))
I've tried a whole bunch of things I don't understand parse(),as.expession()
and the as.name() below but none seem to work.
Here is the function I am using:
function(facvec,base.lm){
if ( missing(facvec) || missing(base.lm) ){
cat("This script assesses the contribution of t...
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&quo...