You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that these if-else statements are only using the first value of the qrt.prc$colMax and calculating the variable using only the information for the quarter where only the first value of qrt.prc$colMax is equal to the statement. In this case, the first value of colMax is equal to "aso" which means that the bio8 variables for ALL the sites are the average value of aug, sep, oct.
In this case, I consider the best syntax to be:
ix <- which(qrt.prc$colMax=="jfm") clim$bio8[ix] <- ((temp$jan + temp$feb + temp$mar)/3)[ix]
In this case, each site will have different values of Bio8 depending on the colMax value. Before, only the "aso" site were having correct values.
The text was updated successfully, but these errors were encountered:
https://github.com/KerkhoffLab/climate-velocity/blob/0db4745cbd3f974558ae769a6b5588c6b3616dfe/functions/bioclim.var.r#L80
Notice that these if-else statements are only using the first value of the
qrt.prc$colMax
and calculating the variable using only the information for the quarter where only the first value ofqrt.prc$colMax
is equal to the statement. In this case, the first value of colMax is equal to "aso" which means that the bio8 variables for ALL the sites are the average value of aug, sep, oct.In this case, I consider the best syntax to be:
ix <- which(qrt.prc$colMax=="jfm")
clim$bio8[ix] <- ((temp$jan + temp$feb + temp$mar)/3)[ix]
In this case, each site will have different values of Bio8 depending on the colMax value. Before, only the "aso" site were having correct values.
The text was updated successfully, but these errors were encountered: