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(
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
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
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
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.
5 matches
Mail list logo