Re: [R] Help with gsub function or a similar function

2012-04-06 Thread Sarah Goslee
You don't provide a reproducible example, or even str(), but I'd guess you need to match ^15 instead of just 15. Sarah On Apr 5, 2012, at 10:38 PM, ieatnapalm era...@tulane.edu wrote: Hey, sorry if this has been addressed before, but I'm really new to R and having trouble with the gsub

[R] Help with gsub function or a similar function

2012-04-05 Thread ieatnapalm
Hey, sorry if this has been addressed before, but I'm really new to R and having trouble with the gsub function. I need a way to make this function exclude certain values from being substituted: ie my data looks something like (15:.0234,10:.0157) and I'm trying to replace the leading 15 with

Re: [R] Help with gsub function or a similar function

2012-04-05 Thread David Winsemius
On Apr 5, 2012, at 10:38 PM, ieatnapalm wrote: Hey, sorry if this has been addressed before, but I'm really new to R and having trouble with the gsub function. I need a way to make this function exclude certain values from being substituted: ie my data looks something like