Thanks a lot, Ista!
On Thu, Apr 7, 2011 at 11:52 AM, Ista Zahn wrote:
> Hi Dimitri,
> The factor() function allows you to specify the levels. So
>
> small.frame$myfactor <- factor(small.frame$myfactor, levels =
> levels(large.frame$myfactor))
>
> should do it.
>
> Best,
> Ista
>
> On Thu, Apr 7,
Hi Dimitri,
The factor() function allows you to specify the levels. So
small.frame$myfactor <- factor(small.frame$myfactor, levels =
levels(large.frame$myfactor))
should do it.
Best,
Ista
On Thu, Apr 7, 2011 at 11:47 AM, Dimitri Liakhovitski
wrote:
> Hello!
>
> I have larger and a smaller data
Hello!
I have larger and a smaller data frame with 1 factor in each - it's
the same factor:
large.frame<-data.frame(myfactor=LETTERS[1:10])
small.frame<-data.frame(myfactor=LETTERS[c(9,7,5,3,1)])
levels(large.frame$myfactor)
levels(small.frame$myfactor)
table(large.frame$myfactor)
table(small.fra
3 matches
Mail list logo