R/SPLATCHE3_basic.R

Defines functions as.SPLATCHE3_settings is.SPLATCHE3_settings as.SPLATCHE3_PopDensity is.SPLATCHE3_PopDensity as.SPLATCHE3_Veg2dyn is.SPLATCHE3_Veg2dyn as.SPLATCHE3_Veg2phase is.SPLATCHE3_Veg2phase as.SPLATCHE3_ArrivalCell is.SPLATCHE3_ArrivalCell as.SPLATCHE3_Sample is.SPLATCHE3_Sample as.SPLATCHE3_Genetic is.SPLATCHE3_Genetic

Documented in as.SPLATCHE3_ArrivalCell as.SPLATCHE3_Genetic as.SPLATCHE3_PopDensity as.SPLATCHE3_Sample as.SPLATCHE3_settings as.SPLATCHE3_Veg2dyn as.SPLATCHE3_Veg2phase is.SPLATCHE3_ArrivalCell is.SPLATCHE3_Genetic is.SPLATCHE3_PopDensity is.SPLATCHE3_Sample is.SPLATCHE3_settings is.SPLATCHE3_Veg2dyn is.SPLATCHE3_Veg2phase

#' SPLATCH3 settings objects
#' 
#' @param x object
#' @param ... ignored
#'
#' @rdname SPLATCHE3_basic
#' @export
as.SPLATCHE3_settings <- function(x, ...) {
  class(x) <- c("SPLATCHE3_settings", class(x))
  return(x)
}

#' @rdname SPLATCHE3_basic
#' @export
is.SPLATCHE3_settings <- function(x, ...) {
  "SPLATCHE3_settings" %in% class(x)
}

#' @rdname SPLATCHE3_basic
#' @export
as.SPLATCHE3_PopDensity <- function(x, ...) {
  return(tibble::new_tibble(x, nrow = nrow(x), class = "SPLATCHE3_PopDensity"))
}

#' @rdname SPLATCHE3_basic
#' @export
is.SPLATCHE3_PopDensity <- function(x, ...) {
  "SPLATCHE3_PopDensity" %in% class(x)
}

#' @rdname SPLATCHE3_basic
#' @export
as.SPLATCHE3_Veg2dyn <- function(x, ...) {
  return(tibble::new_tibble(x, nrow = nrow(x), class = "SPLATCHE3_Veg2dyn"))
}

#' @rdname SPLATCHE3_basic
#' @export
is.SPLATCHE3_Veg2dyn <- function(x, ...) {
  "SPLATCHE3_Veg2dyn" %in% class(x)
}

#' @rdname SPLATCHE3_basic
#' @export
as.SPLATCHE3_Veg2phase <- function(x, ...) {
  return(tibble::new_tibble(x, nrow = nrow(x), class = "SPLATCHE3_Veg2phase"))
}

#' @rdname SPLATCHE3_basic
#' @export
is.SPLATCHE3_Veg2phase <- function(x, ...) {
  "SPLATCHE3_Veg2phase" %in% class(x)
}

#' @rdname SPLATCHE3_basic
#' @export
as.SPLATCHE3_ArrivalCell <- function(x, ...) {
  return(tibble::new_tibble(x, nrow = nrow(x), class = "SPLATCHE3_ArrivalCell"))
}

#' @rdname SPLATCHE3_basic
#' @export
is.SPLATCHE3_ArrivalCell <- function(x, ...) {
  "SPLATCHE3_ArrivalCell" %in% class(x)
}

#' @rdname SPLATCHE3_basic
#' @export
as.SPLATCHE3_Sample <- function(x, ...) {
  return(tibble::new_tibble(x, nrow = nrow(x), class = "SPLATCHE3_Sample"))
}

#' @rdname SPLATCHE3_basic
#' @export
is.SPLATCHE3_Sample <- function(x, ...) {
  "SPLATCHE3_Sample" %in% class(x)
}

#' @rdname SPLATCHE3_basic
#' @export
as.SPLATCHE3_Genetic <- function(x, ...) {
  class(x) <- c("SPLATCHE3_Genetic", class(x))
  return(x)
}

#' @rdname SPLATCHE3_basic
#' @export
is.SPLATCHE3_Genetic <- function(x, ...) {
  "SPLATCHE3_Genetic" %in% class(x)
}
nevrome/RSPLATCHE3 documentation built on March 25, 2020, 12:07 a.m.