/
inherit_methods.R
44 lines (44 loc) · 1.66 KB
/
inherit_methods.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#' Is return of any object of \code{EstimationTools}?
#'
#' @encoding UTF-8
#' @author Jaime Mosquera Gutiérrez \email{jmosquerag@unal.edu.co}
#'
#' @description
#' `r lifecycle::badge("stable")`
#'
#' Checks if an object is any of the classes implemented in \code{EstimationTools}
#' package.
#'
#' @param x an object of \code{EstimationTools} package.
#'
# ==============================================================================
# maxlogL function identification ---------------------------------------------
# ==============================================================================
#' @export
is.maxlogL <- function(x) {
inherits(x, c("maxlogL"))
}
# ==============================================================================
# EmpiricalTTT function identification ----------------------------------------
# ==============================================================================
#' @export
#' @rdname is.maxlogL
is.EmpiricalTTT <- function(x) {
inherits(x, c("EmpiricalTTT"))
}
# ==============================================================================
# EmpiricalTTT function identification ----------------------------------------
# ==============================================================================
#' @export
#' @rdname is.maxlogL
is.HazardShape <- function(x) {
inherits(x, c("HazardShape"))
}
# ==============================================================================
# Optimizer configuration -----------------------------------------------------
# ==============================================================================
#' @export
#' @rdname is.maxlogL
is.optimizer.config <- function(x) {
inherits(x, c("optimizer.config"))
}