Displaying 1 result from an estimated 1 matches for "cwils11".
2011 Jul 27
2
for loop help
I am having a hard time putting the below into a loop, where it pulls out ppt from all he stations I have versus having to go through and hard code the data to the specific stations. I tried
stnID <- stnid[which(duplicated(stnid)==FALSE)]
for(i in 1:length(stnID))
{
ppt[i] <- ppt[which(stnid==[i])]
}
but it doesn't like to use the which function inside a for loop? Any idea's here is