search for: mygroupvar

Displaying 1 result from an estimated 1 matches for "mygroupvar".

Did you mean: mygroupvars
2012 Jan 01
1
How to pass in a list of variables as an argument to a function?
...varC=c("g", "h", "i"), varD=c("old", "new")), n=1000, fail=rbinom(2700,1000, 0.01)) # add in one more column myData$pass = myData$n-myData$fail # List of grouping vars. ?I would like to pass this object around and use it as arguments in functions myGroupVars = c("varA", "varB", "varC") # create a new column that is the combination of the grouping vars (used in plotting with lattice) # Question 1: ?Is there a way to replace "varA, varB, varC" in the function below with an object? myData = transform(myData, group...