pfilter(..., save.states)
+ documentation edits
#223
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are two commits, the first deals with the
save.states
argument of thepfilter
function. The second is unrelated, but addresses some unexpected errors that arise in a few of the\donttest{}
examples.Details
There are no changes to the
tests/*.Rout.save
files that change with the edits to the testing files and function outputs. I thought you might want to see these differences and change them yourself.Commit 598b470:
save.states
This commit is related to discussion comments #181 (comment) and #181 (comment). This modifies the
save.states
argument in thepfilter
function to the following scheme:no
: default, don't save states.filter
: saves the "unweighted particles" after resampling. The name is intended to reference the fact that these particles are draws from the filter distribution.prediction
: saves the "weighted particles". The name is intended to reference the fact that the particles come from the prediction distribution.The function retains backwards compatibility by checking for old input options, matching them to the new options, and throwing a warning.
weighted -> "prediction"
,c(unweighted, TRUE, "TRUE") -> "filter"
, andc(FALSE, "FALSE") -> "no"
. I'm happy to change the namesfilter
andprediction
if you have other preferences.Commit bd616a7: Documentation edits
This is an unrelated change of documentation. There was an extra comma in the
examples/traj_match
file, which doesn't get tested. Similarly, the untested functions inexamples/userdata.R
did not actually use theuserdata
function, and would throw an error if they were ran.