[Pomp-commits] r14 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jul 25 11:49:54 CEST 2008
Author: kingaa
Date: 2008-07-25 11:49:54 +0200 (Fri, 25 Jul 2008)
New Revision: 14
Modified:
pkg/R/aaa.R
Log:
improve error handling: fix language and use sQuote, dQuote where appropriate
Modified: pkg/R/aaa.R
===================================================================
--- pkg/R/aaa.R 2008-07-25 09:27:23 UTC (rev 13)
+++ pkg/R/aaa.R 2008-07-25 09:49:54 UTC (rev 14)
@@ -60,98 +60,98 @@
## functions to extract or call the components of a "pomp" object
data.array <- function (object, ...)
- stop("function 'data.array' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("data.array")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('data.array')
rprocess <- function (object, xstart, times, params, ...)
- stop("function 'rprocess' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("rprocess")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('rprocess')
dprocess <- function (object, x, times, params, log = FALSE, ...)
- stop("function 'dprocess' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("dprocess")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('dprocess')
rmeasure <- function (object, x, times, params, ...)
- stop("function 'rmeasure' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("rmeasure")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('rmeasure')
dmeasure <- function (object, y, x, times, params, log = FALSE, ...)
- stop("function 'dmeasure' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("dmeasure")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('dmeasure')
skeleton <- function (object, x, t, params, ...)
- stop("function 'skeleton' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("skeleton")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('skeleton')
init.state <- function (object, params, t0, ...)
- stop("function 'init.state' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("init.state")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('init.state')
## particle filter
pfilter <- function (object, ...)
- stop("function 'pfilter' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("pfilter")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('pfilter')
## MIF algorithm functions
mif <- function (object, ... )
- stop("function 'mif' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("mif")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('mif')
particles <- function (object, ...)
- stop("function 'particles' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("particles")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('particles')
pred.mean <- function (object, ...)
- stop("function 'pred.mean' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("pred.mean")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('pred.mean')
pred.var <- function (object, ...)
- stop("function 'pred.var' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("pred.var")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('pred.var')
filter.mean <- function (object, ...)
- stop("function 'filter.mean' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("filter.mean")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('filter.mean')
conv.rec <- function (object, ...)
- stop("function 'conv.rec' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("conv.rec")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('conv.rec')
continue <- function (object, ... )
- stop("function 'continue' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("continue")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('continue')
'coef<-' <- function (object, pars, ..., value)
- stop("function 'coef<' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("coef<")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('coef<-')
states <- function (object, ...)
- stop("function 'states' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("states")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('states')
bsmc <- function (object, ...)
- stop("function 'bsmc' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("bsmc")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('bsmc')
#lpspomp and pmpomp class
lpspomp <- function (object, ...)
- stop("function 'lpspomp' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("lpspomp")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('lpspomp')
pmpomp <- function (object, ...)
- stop("function 'pmpomp' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("pmpomp")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('pmpomp')
distance.hist <- function (object, ...)
- stop("function 'distance.hist' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("distance.hist")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('distance.hist')
r.hist <- function (object, ...)
- stop("function 'r.hist' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("r.hist")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('r.hist')
sensitivity.spectrum.fit <- function (object, ...)
- stop("function 'sensitivity.spectrum.fit' is undefined for objects of class '",class(object),"'")
+ stop("function ",sQuote("sensitivity.spectrum.fit")," is undefined for objects of class ",sQuote(class(object)))
setGeneric('sensitivity.spectrum.fit')
# The class "lpspomp" (log power spectrum pomp). Its parts are:
More information about the pomp-commits
mailing list