collect.models
) to create a list of files in use. All other
files are treated as orphans to delete.cleanup(lx = NULL, ask = TRUE, prefix = "mark")
mallard
analysis. The first time
you run the analysis script in an empty subdirectory it would create 9 sets
of MARK output files (mark001.out,.vcv,.res,.inp to
mark009.out,.vcv,.res,.inp) and each would be linked to one of the objects
in nest.results
. When the command
AgePpnGrass=nest.results$AgePpnGrass
was issued, both of those
mark
objects were linked to the same set of output files. Now if you
were to repeat the above commands and re-run the models and stored the
results into nest.results
again, it would create files with prefixes
10 to 18. Because that would have replaced nest.results
, none of the
files numbered 1 to 9 would be linked to an object.
cleanup(ask=FALSE)
automatically removes those orphan files. If you
delete all objects in the R session with the command
rm(list=ls(all=TRUE))
, then subsequently cleanup(ask=FALSE)
will delete all MARK output files because all of them will be orphans.
Output files can also become orphans if MARK finishes but for some reason R
crashes or you forget to save your session before you exit R. Orphan output
files can be re-linked to an R object without re-running MARK by re-running
the mark
function in R and specifing the filename
argument to match the base portion of the orphaned output file (eg
"mark067"). It will create all of the necessary R objects and then asks if
you want to use the existing file. If you respond affirmatively it will
link to the orphaned files.