Re: [R] how to grep in r

2012-12-12 Thread S Ellison
,"\\2", Trade_Price_Band) ) then tbp[is.na(tbp)] <- 501 #or some other number bigger than 500 - Original Message - From: Tammy Ma To: "r-help@r-project.org" Cc: Sent: Wednesday, December 12, 2012 8:40 AM Subject: [R] how to grep in r Hi, I met this pr

Re: [R] how to grep in r

2012-12-12 Thread arun
expr("-.*|.*\\+",dat1[,1] A.K. - Original Message - From: Tammy Ma To: "r-help@r-project.org" Cc: Sent: Wednesday, December 12, 2012 8:40 AM Subject: [R] how to grep in r Hi, I met this problem.   Trade_Price_Band        x 1              0-30 0.6237240 2       

Re: [R] how to grep in r

2012-12-12 Thread Anthony Damico
assuming you want more than just the first four rows tpb <- read.table( text = " Trade_Price_Band x 1 0-30 0.6237240 2 101-150 0.6743857 3 151-200 0.6778513 4 201-300 0.6640293 5 301-400 0.6630991 6 31-50 0.6314547 7

[R] how to grep in r

2012-12-12 Thread Tammy Ma
Hi, I met this problem. Trade_Price_Band x 1 0-30 0.6237240 2 101-150 0.6743857 3 151-200 0.6778513 4 201-300 0.6640293 5 301-400 0.6630991 6 31-50 0.6314547 7 401-500 0.6776249 8 500+ 0.6557705