[1] "a" "b" "c" "d" "others"
A.K.
From: Lorenzo Isella
To: "r-h...@stat.math.ethz.ch"
Sent: Monday, March 25, 2013 6:18 PM
Subject: [R] Reassign Multiple Factors to same Factor Va
or just
levels(df$y)[5:7]<-"others"
Ista Zahn wrote
> Hi Lorenzo,
>
> On Mon, Mar 25, 2013 at 6:18 PM, Lorenzo Isella
> <
> lorenzo.isella@
> > wrote:
>> Dear All,
>> Probably something very easy, but I am looking for the most efficient
>> ways
>> to achieve this.
>> Consider the following sn
Hi Lorenzo,
On Mon, Mar 25, 2013 at 6:18 PM, Lorenzo Isella
wrote:
> Dear All,
> Probably something very easy, but I am looking for the most efficient ways
> to achieve this.
> Consider the following snippet
>
> y<-c('a','b','c','d','e','f','g')
> x<-rnorm(length(y))
> df<-data.frame(y,x)
>
> lea
Dear All,
Probably something very easy, but I am looking for the most efficient ways
to achieve this.
Consider the following snippet
y<-c('a','b','c','d','e','f','g')
x<-rnorm(length(y))
df<-data.frame(y,x)
leading to
df$y
[1] a b c d e f g
Levels: a b c d e f g
Now, I would like to repla
4 matches
Mail list logo