R/dimensions.r

Defines functions dim.mutaframe ncol.mutaframe nrow.mutaframe

#' @S3method nrow mutaframe
nrow.mutaframe <- function(x) length(attr(x, "row.names")) %||% 0
#' @S3method ncol mutaframe
ncol.mutaframe <- function(x) length(attr(x, "col.names")) %||% 0
#' @S3method dim mutaframe
dim.mutaframe <- function(x) c(nrow.mutaframe(x), ncol.mutaframe(x))

Try the plumbr package in your browser

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

plumbr documentation built on May 7, 2022, 1:05 a.m.