search for: stnid

Displaying 2 results from an estimated 2 matches for "stnid".

Did you mean: snid
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 a sample of my code... thanks-Cassie ### label data ### stnid <- dat1[,1] #list of stations...
2008 Apr 14
2
linear regression "group by"
Hi all. I'm brand new to R. My dataset (stored in MySQL) is a list of weather stations in rows by year with various weather variables in columns, for example: STNID YEAR TEMP DEWP station1 1990 54 50 station1 1991 23 10 station1 1992 34 18 station2 1990 45 41 station2 1991 32 25 station2 1992 21 11 I'm trying to run linear regression and get the basic output (i.e. intercept, slope, an...