update.pulsar | R Documentation |
Update a pulsar model with new or altered arguments. It does this by extracting the call stored in the object, updating the call and (by default) evaluating it in the environment of the original pulsar
call.
## S3 method for class 'pulsar'
update(object, ..., evaluate = TRUE)
object |
a n existing pulsar or batch.pulsar object |
... |
arguments to |
evaluate |
Flag to evaluate the function. If |
The update
call is evaluated in the environment specified by the pulsar
or batch.pulsar
object, so if any variables were used for arguments to the original call, unless they are purposefully updated, should not be altered. For example, if the variable for the original data is reassigned, the output of update
will not be on the original dataset.
If evaluate = TRUE
, the fitted object - the same output as pulsar
or batch.pulsar
. Otherwise, the updated call.
eval
, update
, pulsar
, batch.pulsar
## Not run: p <- 40 ; n <- 1200
dat <- huge.generator(n, p, "hub", verbose=FALSE, v=.1, u=.3)
lams <- getLamPath(getMaxCov(dat$data), .01, len=20)
## Run pulsar with huge
hugeargs <- list(lambda=lams, verbose=FALSE)
out.p <- pulsar(dat$data, fun=huge::huge, fargs=hugeargs,
rep.num=20, criterion='stars')
## update call, adding bounds
out.b <- update(out.p, lb.stars=TRUE, ub.stars=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.