R/chllab.R

Defines functions chllab

Documented in chllab

#' Chlorophyll axis label
#' 
#' Get the chlorophyll axis label for observed or log-space, including units
#' 
#' @param logspace logical indicating if chlorophyll is in log space, otherwise observed
#' 
#' @export
#' 
#' @return An expression indicating (log)-chlorophyll in the appropriate units
#' 
#' @examples
#' 
#' ## default
#' chllab()
chllab <- function(logspace = TRUE){

  # default
  label <- expression(
    paste('log-Chloropyhll-',italic(a),' (',italic('\u03bc'),'g ',L^-1,')')
    )

  # back-transform if needed
  if(!logspace){
    
    label <- expression(
      paste('Chloropyhll-',italic(a),' (',italic('\u03bc'),'g ',L^-1,')')
    )
  }
  
  return(label)
  
}
  
  

Try the WRTDStidal package in your browser

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

WRTDStidal documentation built on Nov. 18, 2019, 1:06 a.m.