sday, 19 August 2010 5:41 p.m.
> > To: r-help@r-project.org
> > Subject: [R] modifying factors in a data frame
> >
> > Hi All
> >
> > I have a data frame in which on the columns is a factor with following
> > levels
> >
> > Levels: M006 M0114 M03
lp-boun...@r-
> project.org] On Behalf Of Abhishek Pratap
> Sent: Thursday, 19 August 2010 5:41 p.m.
> To: r-help@r-project.org
> Subject: [R] modifying factors in a data frame
>
> Hi All
>
> I have a data frame in which on the columns is a factor with following
> lev
Hi All
I have a data frame in which on the columns is a factor with following
levels
Levels: M006 M0114 M0379 M0432 M0823 M1012 M1096 M1107 SW393 SW708
I want to change all the M006 to "1", M0114 to "2" and so on. What I am
trying is not working.
data1$sample[data1$sample =='M006'] <- "1"
Warn
3 matches
Mail list logo