R/is.appeased.R

Defines functions is.appeased

Documented in is.appeased

###########################################################################
# is.appeased                                                             #
#                                                                         #
# The purpose of the is.appeased function is to perform a logical test of #
# whether or not Laplace's Demon is appeased with an object of class      #
# demonoid.                                                               #
###########################################################################

is.appeased <- function(x)
     {
     appeased <- FALSE
     if(!identical(class(x), "demonoid"))
          stop("x must be of class demonoid.")
     captive <- capture.output(Consort(x))
     z <- grep("has been appeased", captive)
     if(length(z) > 0) appeased <- TRUE
     return(appeased)
     }

#End

Try the LaplacesDemon package in your browser

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

LaplacesDemon documentation built on July 9, 2021, 5:07 p.m.