It's high time for a small, reproducible example. Don't say, "for
example", *give* us an example in R.
That being said, something like
combined[!names(combined) %in% names(miceSample)]
might be a start...
Addi Wei wrote:
But "miceSample" has multiple columns... For example if nvars=4, I have 4
columns of data to delete from "combined".
Specifically, I have 187 columns in "combined", and "miceSample" only has 4
columns. So the new data frame should have 183 columns.
______________________________________________
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.