Displaying 1 result from an estimated 1 matches for "tsoil_flux".
2012 Nov 01
2
Name assignment in for loop
...bject". The linear model runs
without error; only the name is problematic.
Here is the current loop syntax. The use of dat and dat2
is not an error. I'm pulling data from 2 sources for the model.
for (i in 1:dim(dat2)[[1]]) {
assign("modelb",i) <- lm(log(dat$flux) ~ dat$Tsoil_flux,
subset = dat$chamber == dat2$chamber[i] & dat$year == dat2$year[i] & dat$doy >= dat2$day1[i] & dat$doy <= dat2$day2[i])
dat2$coef[i] <- coef(assign("modelb",i, sep = ""))[[2]]
dat2$Rsq[i] <- summary(assign("modelb",i, sep = ""))[[9]]...