R/tdf.R

Defines functions is_tdf_multi is_tdf

Documented in is_tdf is_tdf_multi

#' Test if the object is a tdf object
#'
#' This function returns `TRUE` for the object returned from the 
#' \code{generate.placebos} function.
#' and `FALSE` for all other objects, including regular data frames.
#'
#' @param x An object
#' @return `TRUE` if the object inherits from the `tdf` class.
#' @export
is_tdf <- function(x) {
	inherits(x, "tdf")
}

#' Test if the object is a tdf_multi object
#'
#' This function returns `TRUE` for the object returned from the 
#' \code{multiple.synth} function.
#' and `FALSE` for all other objects, including regular data frames.
#'
#' @param x An object
#' @return `TRUE` if the object inherits from the `tdf_multi` class.
#' @export
is_tdf_multi <- function(x) {
	inherits(x, "tdf_multi")
}

Try the SCtools package in your browser

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

SCtools documentation built on June 9, 2022, 5:06 p.m.