Re: [R] help required state wise count

2010-05-25 Thread Jim Lemon
On 05/24/2010 10:21 PM, Mohan L wrote: ... in this case the state column becomes the row index. I want the state name as the first column. There may be a way to do it. Hi Mohan, You can do it with this awful kludge, but there must be a better way: dummy-data.frame(

[R] help required state wise count

2010-05-24 Thread Mohan L
I have the data like this: dummy State Months No 1xxxJan 1 2xxxJan 2 3xxxJan 1 4yyyJan 1 5yyyJan 2 6yyyJan 1 7zzzJan 3 8zzzJan 1 9zzzJan 2 10 xxxFeb 3 11 xxxFeb 4 12 xxxFeb 2 13 yyyFeb

Re: [R] help required state wise count

2010-05-24 Thread Jim Lemon
On 05/24/2010 07:44 PM, Mohan L wrote: I have the data like this: dummy State Months No 1xxxJan 1 2xxxJan 2 3xxxJan 1 4yyyJan 1 5yyyJan 2 6yyyJan 1 7zzzJan 3 8zzzJan 1 9zzzJan 2 10 xxxFeb 3 11 xxx

Re: [R] help required state wise count

2010-05-24 Thread Mohan L
Hi Mohan, Try this: table(dummy$State,dummy$Months) Jim Thanks for your time. table(dummy$State,dummy$Months) in this case the state column becomes the row index. I want the state name as the first column. There may be a way to do it. Thanks Rg Mohan L [[alternative HTML

Re: [R] help required state wise count

2010-05-24 Thread David Winsemius
On May 24, 2010, at 8:21 AM, Mohan L wrote: Hi Mohan, Try this: table(dummy$State,dummy$Months) Jim Thanks for your time. table(dummy$State,dummy$Months) in this case the state column becomes the row index. I want the state name as the first column. There may be a way to do it.