Displaying 1 result from an estimated 1 matches for "infoch".
2012 Nov 12
2
Using "apply" instead of "for" loop / multithreading
...lues of* CO2 in ppm (resp[i,6])* that I
want to convert in umol of CO2 emitted by stem volume biomass (CO2v) and
stem area (CO2s). (tree respiration)
The loop that I have is calculating the CO2 fluxes for each row.
*Script :*
for (i in 1:nrow(resp)) {
k=resp[i,5]
CO2umol[i]<-resp[i,6]*((Press*infoch[k,11]*1e-6)/(R*(resp[i,7]+273.15)))
CO2v[i]<-CO2umol[i]/(infoch[k,10])
CO2s[i]<-CO2umol[i]/(infoch[k,9])
}
For that, I have two data frames :
- *infoch :* variables used to calculate CO2 fluxes (16 rows with the
characteristics of 16 analysis chambers)
<http://r.789695.n4.nabble.com/file...