Skip to content
Back to formatted view

Raw Message

Message-ID: <927632887.2224306.1464291352800.JavaMail.yahoo@mail.yahoo.com>
Date: 2016-05-26T19:35:52Z
From: Elahe chalabi
Subject: subset data right

Hi all,
I have the following df and I want to know which Protocols are VeryFast, which are FAST, which are SLOW and also which ones are VerySLOW :

    
  $ Protocol       : Factor w/ 48 levels "DP FS QTSE SAG",..: 5 5 28 5 5 5 7 7 47 5 ...

  $ quant          : Factor w/ 4 levels "FAST","SLOW",..: 2 2 2 4 2 1 1 2 4 

I do the following subset but nothing is changed in my df:


  subdf=subset(df,quant%in%c("VeryFast"))
  subdf$quant=factor(subdf$quant)
and when I get the str(df) again Protocol has 48 levels. Does anyone know how can I get these subsets right?
Thanks for any help!
Elahe