> On 01 Mar 2016, at 18:33 , David L Carlson wrote:
>
> You need to learn how to send emails in plain text since html gets mangled on
> r-help. See your message below. If I understand your question, it has to do
> with what happens to factor levels when you subset your data. Subsetting a
> fa
Without more information it is hard to see where things go wrong.
To judge from your text, I am not sure you do things correct. You are doing
it along the lines of:
str(mydata)
submydata <- subset(mydata, ... )
submydata <- droplevels(submydata)
str(submydata)
right?
On Tue, 1 Mar 2016 at 17:45
Hi,
I think droplevels(df) is what you are looking for.
Best wishes,
Ulrik
On Tue, 1 Mar 2016 at 17:33 hoda rahmati via R-help
wrote:
> Hi all,I have the following main data frame:(mydata)$ TE : num 40
> 40 20 20 20 20 20 20 20 40 ...$ TR : num 49 49 28 28 28 28 28 28 28
> 49 .
I also tried droplevels but after getting str(submydata) again I see no changes
in COUNTRY
On Tuesday, March 1, 2016 8:38 AM, Ulrik Stervbo
wrote:
Hi,
I think droplevels(df) is what you are looking for.
Best wishes,
Ulrik
On Tue, 1 Mar 2016 at 17:33 hoda rahmati via R-help
wrote:
Hi all,I have the following main data frame:(mydata) $ TE : num 40 40 20
20 20 20 20 20 20 40 ... $ TR : num 49 49 28 28 28 28 28 28 28 49 ...
$ COUNTRY : Factor w/ 27 levels "","AU","BA","BE",..: 8 8 8 8 8 ...among
the COUNTRY I just need US and AU,first I get a subset to c
5 matches
Mail list logo