Try this:
> with(unique(x), table(V2, V3))
V3
V2Apple Cake
One 21
On Mon, Sep 29, 2008 at 4:54 AM, Shubha Vishwanath Karanth
<[EMAIL PROTECTED]> wrote:
> Hi R,
>
>
>
> This is a cross tabulation question. Suppose that,
>
>
>
>> d=read.table("clipboard",header=F)
>
>
>
>> d
>
>
?aggregate or have a look at the reshape package.
--- On Mon, 9/29/08, Shubha Vishwanath Karanth <[EMAIL PROTECTED]> wrote:
> From: Shubha Vishwanath Karanth <[EMAIL PROTECTED]>
> Subject: [R] Cross-tabulation Question
> To: [EMAIL PROTECTED]
> Received: Monday, September 29, 2008, 4:54 AM
> Hi
> x
V1 V2V3
1 A One Apple
2 A One Cake
3 A One Cake
4 B One Apple
5 B One Apple
6 B One Apple
> tapply(x$V1, list(x$V2, x$V3), function(z) length(unique(z)))
Apple Cake
One 21
>
On Mon, Sep 29, 2008 at 4:54 AM, Shubha Vishwanath Karanth
<[EMAIL PROTECTED]> wrote:
> Hi R
3 matches
Mail list logo