R/nrow.dataElement.R

Defines functions nrow.dataElement

Documented in nrow.dataElement

#' S3 method nrow for dataElement objects (S4)
#'
#' A nrow method for \emph{dataElement} objects
#'
#' @param da a dataElement
#' @param ... parameters of the nrow generic function
#' @return the number of rows
#'
#' @export
nrow.dataElement <- function(da, ...){
  if (da@type == 'ANN') {
    n <- nrow(da@obsDescr)
  } else {
    n <- nrow(da)
  }
  return(n)
}
jwist/fusion documentation built on Jan. 25, 2024, 3:24 p.m.