[R] How to delete a date frame from a data frame

Erik Iverson eriki at ccbr.umn.edu
Thu Jul 15 22:19:07 CEST 2010


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.



More information about the R-help mailing list