R/T50.R

T50 <- function(time, nger) {
 N <- max(nger)

 ni <- max(nger)
 ti <- max(time)

 nj <- min(nger)
 tj <- min(time)


  for (i in length(time):1) {
    if (ni > ((N)/(100/50))) {
      ni = nger[i]
      ti = time[i]
      }
  }

 for (j in 1:length(time)) {
   if (nj < ((N)/(100/50))) {
     nj = nger[j]
     tj = time[j]
   }
 }
 result <- ti + (((N)/(100/50) - ni)*(tj - ti))/(nj-ni)

 return(result)
}

Try the SeedCalc package in your browser

Any scripts or data that you put into this service are public.

SeedCalc documentation built on May 2, 2019, 8:26 a.m.