Thank you very much. The advice I followed (and which, for some reason, I do
not see here right now) was to use 'droplevels'. I needed the command for
several variables at the same time, so this was very convenient.
>
Hello,
Have you tried 'droplevels':
test <-data.frame(a=as.factor(rep(c("f1","f
Hi,
On Tue, Jun 26, 2012 at 8:06 AM, svo wrote:
> Hi,
>
> I have exactly the same question (how to remove empty levels in my subset),
> but in my case the factor command does not work, because my dataframe is not
> atomic
>
>> Try this:
>>
>> test2$a <- factor(test2$a)
>>
>
> R gives me the error
Hi,
I have exactly the same question (how to remove empty levels in my subset),
but in my case the factor command does not work, because my dataframe is not
atomic
> Try this:
>
> test2$a <- factor(test2$a)
>
R gives me the error message:
Error in sort.list(y) : 'x' must be atomic for 'sort.lis
Thanks
it work perfectly.
2008/11/10 Henrique Dallazuanna <[EMAIL PROTECTED]>
> Try this:
>
> test2$a <- factor(test2$a)
>
> On Mon, Nov 10, 2008 at 10:33 AM, Ronaldo Reis-Jr. <[EMAIL PROTECTED]>wrote:
>
>> Hi,
>>
>> when I use use subset in a data.frame, all empty levels are maintained in
>> th
Try this:
test2$a <- factor(test2$a)
On Mon, Nov 10, 2008 at 10:33 AM, Ronaldo Reis-Jr. <[EMAIL PROTECTED]>wrote:
> Hi,
>
> when I use use subset in a data.frame, all empty levels are maintained in
> the new table.
>
> > test <-
> data.frame(a=as.factor(rep(c("f1","f2","f3"),10)),b=rep(c(1,2,3)
Hi,
when I use use subset in a data.frame, all empty levels are maintained in
the new table.
> test <-
data.frame(a=as.factor(rep(c("f1","f2","f3"),10)),b=rep(c(1,2,3),10))
> summary(test)
ab
f1:10 Min. :1
f2:10 1st Qu.:1
f3:10 Median :2
Mean :2
3rd Q
6 matches
Mail list logo