Displaying 3 results from an estimated 3 matches for "botulin".
Did you mean:
bootlin
2010 Jun 22
2
constructing a data frame from ftable
Dear R People:
I have the following data set with the columns DATE, GENDER, and Co.
Co has 8 possible options.
> a.df[1:10,]
DATE GENDER Co
1 2009-04-16 F Rash
2 2009-04-16 F Other
3 2009-04-16 M Botulinic
4 2009-04-16 M Other
5 2009-04-16 M Constitutional
6 2009-04-16 F Other
7 2009-04-16 M Other
8 2009-04-16 M Other
9 2009-04-16 F Other
10 2009-04-16 F Other
Using ftable, I created a table by Date, Co...
2010 Jun 21
1
using table and tapply?
Dear R People:
Here is a little section of a data frame:
> zzz[1:10,]
DATE GENDER AGE Co DEATH1
3945 2009-04-16 M 24 Botulinic 23
3851 2009-04-16 M 35 Constitutional 23
8495 2009-04-16 F 49 Constitutional 27
10967 2009-04-16 F 47 Constitutional 28
11164 2009-04-16 F 26 Constitutional 28
15220 2009-04-16 M 49 Gastrointestinal 30
1207 2009-04-16 F 39...
2010 Jun 21
0
using table and tapply? solved
Here is my solution:
tapply(zzz$DEATH1,zzz$GENDER,sum, na.rm=TRUE)
Dear R People:
Here is a little section of a data frame:
> zzz[1:10,]
DATE GENDER AGE Co DEATH1
3945 2009-04-16 M 24 Botulinic 23
3851 2009-04-16 M 35 Constitutional 23
8495 2009-04-16 F 49 Constitutional 27
10967 2009-04-16 F 47 Constitutional 28
11164 2009-04-16 F 26 Constitutional 28
15220 2009-04-16 M 49 Gastrointestinal 30
1207 2009-04-16 F 39...