#' Table of bsaf and cbiota for contaminant
#'
#' @param bsaf bsaf output from \code{\link{bioaccum_batch}}
#' @param cbiota cbiota output from \code{\link{bioaccum_batch}}
#' @param cntbsaf selected contaminant
#'
#' @export
#'
#' @import dplyr tidyr
#' @importFrom magrittr "%>%"
tab_bsaf <- function(bsaf, cbiota, cntbsaf = NULL){
# combine for plotting
totab <- rescmb(bsaf, cbiota, cntbsaf) %>%
mutate(val = round(val, 3)) %>%
pivot_wider(names_from = species, values_from = val) %>%
rename(Output = var) %>%
mutate(Output = factor(Output, levels = c('Tissue conc. (ng/g wet)', 'BSAF'))) %>%
arrange(Output)
return(totab)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.