Hi, I am trying to subset a dataset based on a filter defined by a user... I prompt the user for input.. resulting in a string logical expression ("X1 < 3").
I have tried using subset, but it is looking for a logical expression, not a character string. I keep getting the error: 'subset' must evaluate to logical. Example: x <- data.frame(matrix(1:15, nrow=5, ncol=3)) filter = "X1 < 3" subset(x, filter) Any ideas?? Thanks much, Tracey [[alternative HTML version deleted]] ______________________________________________ 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.