Re: [R] Changing some values within a variable

2010-07-22 Thread Toni Pitcher
uestion, see sub() (or gsub()) - again paying attention to whether or not you are dealing with factor or character variables. HTH Peter Alspach -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Toni Pitcher Sent: Friday,

Re: [R] Changing some values within a variable

2010-07-22 Thread Peter Alspach
h factor or character variables. HTH Peter Alspach > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Toni Pitcher > Sent: Friday, 23 July 2010 9:44 a.m. > To: r-help@r-project.org > Subject: [R] Changing some v

Re: [R] Changing some values within a variable

2010-07-22 Thread Jannis
Toni Pitcher schrieb: This works to some extent, all As have been changes to Cs, but the Bs have also been changed, in this case to "2", instead of remaining as their original values. How do I get the Bs to stay the same? You should consult some introductory tutorial dealing with Rs way of t

[R] Changing some values within a variable

2010-07-22 Thread Toni Pitcher
Hi I'm new to R and would like some help with a couple of problems. I suspect the solutions are quite simple. I have a data.frame (data) with 40 variables and 5238 observations created from ~150 text files using read.table. I would like to change some of the entries within two different col