Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

R : want to delete a level from a factor varibale with r

$
0
0

@loubna181 wrote:

Hello I have a table with a facor variable with 3 levels. I make a subset of it where i keep only 2 levels.
the point is that the varibale keep showing 3 levels
test<-data[bloc!=1,]
levels (test$class)
[1] "class1" "class2" "class3"
summary(test$class)
class1 class2 class3
162 37 0
Any idea how I can fix that ?
TIA

Posts: 8

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles