Re: [R] delete columns which partially match expression

2011-10-13 Thread William Dunlap
O Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of jim holtman > Sent: Thursday, October 13, 2011 6:24 AM > To: Samir Benzerfa > Cc: r-help@r-project.org > Subject: Re: [R] delet

Re: [R] delete columns which partially match expression

2011-10-13 Thread jim holtman
try this: > x <- read.table(textConnection("A B C D > E + 12 33 Error1 71 Error2 + 12 33 Error1 71 Error2 + 12 33 Error1 71 Error2 + 12 33

[R] delete columns which partially match expression

2011-10-13 Thread Samir Benzerfa
Hello everyone, I'd like to search for certain "expressions" (characters) in my data.frame and delete the containing columns. So, for example in the below table, I'd like to delete all columns which contain the expression "Error". That is, R should delete column C and E from my data. Any id