R/return_log2_labels.R

Defines functions return_log2_labels

Documented in return_log2_labels

#' Helper function to make log2 labels for axes
#'
#' @param expo A list of exponents; can be a numeric or character vector 
#' @return A list of expressions of the form 2^
#'
#' @export

return_log2_labels <- function(expo) {
  lapply(expo, function(x) bquote(2^.(x)))
}
ctriandafillou/cat.extras documentation built on Aug. 27, 2020, 11:04 p.m.