search for: month2

Displaying 3 results from an estimated 3 matches for "month2".

Did you mean: months
2009 Mar 06
1
Interpreting GLM coefficients
...Zone.23 Zone.24 -4.416915e+02 4.758455e-01 -1.270986e-04 -5.436199e-01 -1.068809e-01 -1.498580e-01 2.958462e-01 1.316589e-01 -1.328204e-01 -1.605802e-01 5.281869e-03 7.422885e-02 Hours Fishers Month1 Month2 Month3 Month4 Month5 Month6 Month7 Month8 Month9 Month10 9.772076e-02 -2.709955e-03 -1.586887e-01 -1.887837e-02 -5.183241e-03 5.870942e-02 7.075386e-02 2.061223e-02 7.372268e-03 -...
2011 Jul 27
2
for loop help
...t1[,4] # data year month <- dat1[,5] #data month ppt <- dat2 #precipiation data #### station's missing zero years ### ppt2 <- matrix(ppt[,which(stnid == '140365')],ncol=1) year2 <- year[which(stnid == '140365')] year2 <- year2[which(duplicated(year2) == FALSE)] month2 <- month[which(stnid == '140365')] ppt3 <- matrix(ppt[,which(stnid == '140405')],ncol=1) year3 <- year[which(stnid == '140405')] year3 <- year3[which(duplicated(year3) == FALSE)] month3 <- month[which(stnid == '140405')]
2011 Dec 04
3
Group several variables and apply a function to the group
...89", "0.005", "-0.0078", "0.67" ) df<- data.frame(comn=comn, mi=mi, x=x) For each company, within a particular month, I would like to compute the standard deviation of x: for example, for abc, I would like to compute the sd of x for month1 (when mi=1) and for month2 (when mi=2). In other languages (Stata for instance), I would create a grouping variable (group comnn and mi) and then, apply the sd function for each group. However, I don't find an elegant way to do the same in R: I was thinking about the following: I could subset my data frame by mi and c...