R/OH2012.R

Defines functions OH2012

Documented in OH2012

OH2012 <- function(FL, eqn, data=NULL) {
  if(eqn == "theropods") {
    log.OH2012 <- 3.1854 * log10(FL) - 3.184
    OH2012 <- round((10^log.OH2012), 2)
    return(cbind(data, log.OH2012, OH2012))
  }
  if(eqn == "sauropods") {
    log.OH2012 <- 2.3459 * log10(FL) - 0.2935
    OH2012 <- round((10^log.OH2012), 2)
    return(cbind(data, log.OH2012, OH2012))
  }
  if(eqn == "ornithischians") {
    log.OH2012 <- 3.0587 * log10(FL) - 2.7042
    OH2012 <- round((10^log.OH2012), 2)
    return(cbind(data, log.OH2012, OH2012))
  }
}

Try the MASSTIMATE package in your browser

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

MASSTIMATE documentation built on Jan. 8, 2021, 2:22 a.m.