er Dalgaard
> Sent: Tuesday, September 12, 2006 11:45 AM
> To: Afshartous, David
> Cc: r-help@stat.math.ethz.ch
> Subject: Re: [R] levels of factor when subsetting the factor
>
> "Afshartous, David" <[EMAIL PROTECTED]> writes:
>
>>
>> All,
>>
>>
"Afshartous, David" <[EMAIL PROTECTED]> writes:
>
> All,
>
> When I take a subset of a factor the reduced factor still maintains all
> the original levels of the factor when say forming the key in a plot.
> The data is correct, but the variable still "remembers" the original
> levels. See belo
y, September 12, 2006 11:45 AM
To: Afshartous, David
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] levels of factor when subsetting the factor
"Afshartous, David" <[EMAIL PROTECTED]> writes:
>
> All,
>
> When I take a subset of a factor the reduced factor still maintains
>
Web: http://med.kuleuven.be/biostat/
http://www.student.kuleuven.be/~m0390867/dimitris.htm
- Original Message -
From: "Afshartous, David" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, September 12, 2006 5:22 PM
Subject: [R] levels of factor when subsetting the factor
>
> Al
ber 12, 2006 11:32 AM
> To: Afshartous, David; r-help@stat.math.ethz.ch
> Subject: Re: [R] levels of factor when subsetting the factor
>
> You have at least two choices:
>
> R> factor(fact[1:6])
> [1] A A A B B B
> Levels: A B
> R> fact[1:6, drop=TRUE]
&g
help@stat.math.ethz.ch
Onderwerp: [R] levels of factor when subsetting the factor
All,
When I take a subset of a factor the reduced factor still maintains all
the original levels of the factor when say forming the key in a plot.
The data is correct, but the variable still "remembers" the
I think you want 'fact[1:6, drop = TRUE]'
-roger
Afshartous, David wrote:
>
> All,
>
> When I take a subset of a factor the reduced factor still maintains all
> the original levels of the factor when say forming the key in a plot.
> The data is correct, but the variable still "remembers" the o
On 9/12/06, Afshartous, David <[EMAIL PROTECTED]> wrote:
>
> All,
>
> When I take a subset of a factor the reduced factor still maintains all
> the original levels of the factor when say forming the key in a plot.
> The data is correct, but the variable still "remembers" the original
> levels. See
You have at least two choices:
R> factor(fact[1:6])
[1] A A A B B B
Levels: A B
R> fact[1:6, drop=TRUE]
[1] A A A B B B
Levels: A B
HTH,
Andy
From: Afshartous, David
>
> All,
>
> When I take a subset of a factor the reduced factor still
> maintains all
> the original levels of the factor wh
Try
> new.fact = fact[1:6, drop=TRUE]
On 12/09/06, Afshartous, David <[EMAIL PROTECTED]> wrote:
>
> All,
>
> When I take a subset of a factor the reduced factor still maintains all
> the original levels of the factor when say forming the key in a plot.
> The data is correct, but the variable st
23 AM
> To: r-help@stat.math.ethz.ch
> Subject: [R] levels of factor when subsetting the factor
>
>
> All,
>
> When I take a subset of a factor the reduced factor still
> maintains all the original levels of the factor when say
> forming the key in a plot.
> The data is
All,
When I take a subset of a factor the reduced factor still maintains all
the original levels of the factor when say forming the key in a plot.
The data is correct, but the variable still "remembers" the original
levels. See below for reproducible code. Does anyone know how to fix
this?
che
12 matches
Mail list logo