tsunhin wong wrote:
Dear R Users,

I have some dynamic selection rules that I want to pass around for my functions:

rules <- paste(g$TrialList==1 & g$Session==2)

I guess you do not want to paste() at all:

rules <- g$TrialList==1 & g$Session==2

Uwe Ligges


myfunction <- function(rules) {
  index <- which(rules)
  anotherFunction(index)
}

However, I can't find a way to pass around these selection rules
easily (for subset, for which, etc)
Please let me know if you have some idea.

Thank you very much!

- John

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to