R/is-.R

Defines functions is.FELLA.USER is.FELLA.DATA

Documented in is.FELLA.DATA is.FELLA.USER

#' Check FELLA.DATA class
#' 
#' Is \code{x} a \code{\link[FELLA]{FELLA.DATA}} object?
#'
#' @param x Object to check
#'
#' @return Logical value stating if \code{x} 
#' is a \code{\link[FELLA]{FELLA.DATA}} object
#' 
#' @export
#' @examples 
#' data(FELLA.sample)
#' is.FELLA.DATA(FELLA.sample)
#' is.FELLA.DATA(42)
is.FELLA.DATA <- function(x = NULL) {
    return(inherits(x, "FELLA.DATA"))
}

#' Check FELLA.USER class
#' 
#' Is \code{x} a \code{\link[FELLA]{FELLA.USER}} object?
#'
#' @param x Object to check
#'
#' @return Logical value stating if \code{x} 
#' is a \code{\link[FELLA]{FELLA.USER}} object
#' 
#' @examples 
#' is.FELLA.USER(new("FELLA.USER"))
#' is.FELLA.USER(42)
#' 
#' data(FELLA.sample)
#' data(input.sample)
#' obj <- enrich(
#' compounds = input.sample, 
#' method = "diffusion", 
#' data = FELLA.sample)
#' is.FELLA.USER(obj)
#' 
#' @export
is.FELLA.USER <- function(x = NULL) {
    return(inherits(x, "FELLA.USER"))
}
b2slab/FELLA documentation built on March 3, 2021, 2:22 p.m.