I'm trying to subset data, but it seems I'm doing something wrong.
My data is one column data with a header such as :
platform
========
service
vps
dedic
dedic
vps
service
dedic
....
...
..
.
I've got it from a big data set by:
servertype<- mydata[c(18)] #it was 18th variale
Now I'm trying to filter it and subset only what I need, omitting all "services"
servertype <- subset(servertype, platform=="dedicated" | platform=="vps")
I expect to get something like :
platform
========
vps
dedic
dedic
vps
dedic
....
...
..
.
and by checking the data, this is exactly what I'm getting
but when I'm checking the summary, I'm getting
> summary(servertype)
platform
dedicated:8564
service : 0
vps :4677
and when plotting, "service" comes up as well...
I tried to restart R, restart session, clean data, etc.. :)
But no changes, I suppose subset with conditions is not working as I expected ? is there any other way around ?