R/utils.R

Defines functions mat2d_f

#' @importFrom tibble as_tibble
mat2d_f <- function(x) {
  
  if (is.null(x)) {
    return(NULL)
  }
  if (is.null(dim(x))) {
    x <- matrix(x)
  }
  colnames(x) <- letters[1:ncol(x)]
  tibble::as_tibble(x)
}
hypertidy/tabularaster documentation built on Jan. 17, 2024, 2:48 p.m.