R/as-data-frame.R

Defines functions as.data.frame.ypr_ecotypes as.data.frame.ypr_populations as.data.frame.ypr_population

#' @export
as.data.frame.ypr_population <- function(x, ...) {
  chk_unused(...)
  x <- unclass(x)
  as.data.frame(x)
}

#' @export
as.data.frame.ypr_populations <- function(x, ...) {
  chk_unused(...)
  x <- lapply(x, as.data.frame)
  do.call("rbind", x)
}

#' @export
as.data.frame.ypr_ecotypes <- function(x, ...) {
  chk_unused(...)
  rname <- attr(x, "names")
  x <- lapply(x, as.data.frame)
  do.call("rbind", x)
}

Try the ypr package in your browser

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

ypr documentation built on Aug. 30, 2022, 1:11 a.m.