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

[R] Executing for loop by grouping variable within dataframe

2011-07-27 Thread ssobek
Dear list, I have a large dataset which is structured as follows: locality=c("USC00020958", "USC00020958", "USC00020958", "USC00020958", "USC00020958", "USC00021001","USC00021001", "USC00021001", "USC00021001", "USC00021001", "USC00021001") temp.a=c(-1.2, -1.2, -1.2, -1.2, -1.1, -2.2, -2.4, -2.6