Re: [R] Executing for loop by grouping variable within dataframe

2011-07-28 Thread ssobek
Dear Dennis, Thank you very much for your quick response! Your code does indeed solve my problem. I figured I would have to define a function somehow to use anything like ddply or similar, but couldn't wrap my head around how to set it up properly. I only started using R for anything more sophist

Re: [R] Executing for loop by grouping variable within dataframe

2011-07-27 Thread Dennis Murphy
Hi: I don't get exactly the same results as you did in the second group (how does temp.t[1] = -2.0 instead of -2.2?) but try this: locality=c("USC00020958", "USC00020958", "USC00020958", "USC00020958", "USC00020958", "USC00021001","USC00021001", "USC00021001", "USC00021001", "USC00021001", "USC00