Displaying 1 result from an estimated 1 matches for "basemonth".
2010 May 20
2
Re : Manipulating Data Frames
...0 2 2 0
2 BBB 1298 1195 1212 1244 1158 845
3 CCC 0 0 0 1 2 1
4 DDD 5 11 17 15 10 9
5 EEE 18 28 27 23 23 16
6 FFF 68 152 184 135 111 86
from this data frame, I took "Jan" as base and calculating weightage like
this :
> basemonth.sum <- sum(data[[2]])
> basemonth.sum
[1] 1390
> basemonth.data <- data[[2]]
> basemonth.data
[1] 1 1298 0 5 18 68
> weightage <- basemonth.data / basemonth.sum
> weightage
[1] 0.0007194245 0.9338129496 0.0000000000 0.0035971223 0.0129496403
[6] 0.04892086...