Displaying 2 results from an estimated 2 matches for "buskart".
Did you mean:
burkart
2003 Jan 10
0
Thanks: Re: count levels per factor level
Dear Lockwood,
As you can see, I'm a beginner...
But thank you very much!
Sincerely,
Tord
Quoting "J.R. Lockwood" <lockwood at rand.org>:
> how about
>
> buskartant$buskartant <- sapply( group.list, function(x)
> sum(!is.na(unique(x))) )
>
> OR
>
> buskartant$buskartant <- sapply( group.list, function(x)
> length(unique(x[!is.na(x)])) )
>
>
> On Fri, 10 Jan 2003, Tord Snall wrote:
>
> > Date: Fri, 10 Jan 2003 1...
2003 Jan 09
0
aggregate() nlevels()
...ng levels, per ObjektID, of
cpy.busk$TradArt,
but this line returns the TOTAL number of levels occurring in
cpy.busk$TradArt for each ObjektID.
This was difficult to say in English! Did you get it?
Is there any function for doing what I want. I have tried searching the
archives without success.
buskartant<- aggregate(list(buskartant = cpy.busk$TradArt), list(ObjektID =
cpy.busk$ObjektID), nlevels)
Thanks in advance!
Sincerely,
Tord
-----------------------------------------------------------------------
Tord Sn?ll
Avd. f v?xtekologi, Evolutionsbiologiskt centrum, Uppsala universitet
Dept. o...