temp_files | R Documentation |
NONMEM produces a lot of temporary files which can add up to a lot of disk
space. One strategy to remove this is to use the clean
option in the PsN
command. However, this can automatically remove files as soon as the run
finishes that may be useful for debugging. ls_tempfiles()
allows you to
list the paths of all temporary files, for a single run or for all runs for
inspection and deletion. clean_tempfiles()
is a wrapper function that runs
ls_tempfiles()
and deletes everything returned. For safety is limited to
only deleting files associated with nm
objects though.
ls_tempfiles( object = ".", output_loc = c("run_dir", "base"), run_files = NA_character_, include_slurm_files = TRUE, ctl_extension = "mod", include_psn_exports = FALSE ) clean_run(m, output_loc = c("run_dir", "base"), include_slurm_files = TRUE) clean_tempfiles( object = ".", output_loc = c("run_dir", "base"), include_slurm_files = TRUE )
object |
Either an nm object or path to project (default = |
output_loc |
Optional character for locating files. Either |
run_files |
Optional character vector. Search amongst only these files
instead. Default value |
include_slurm_files |
Logical (default = |
ctl_extension |
Character. Extension of control file (default = |
include_psn_exports |
Logical (default = |
m |
An nm object |
Setting include_psn_exports = TRUE
will break 'Pirana' and 'xpose'
capability as these software use exported files.
A character
vector of temporary file paths
# create example object m1 from package demo files exdir <- system.file("extdata", "examples", "theopp", package = "NMproject") m1 <- new_nm(run_id = "m1", based_on = file.path(exdir, "Models", "ADVAN2.mod"), data_path = file.path(exdir, "SourceData", "THEOPP.csv")) ls_tempfiles(m1) ## if no files, will be empty m1 %>% ls_tempfiles() %>% unlink() ## delete all m1 temp files ## above line is equivalent to: clean_tempfiles(m1) ls_tempfiles() ## display all temp files in analysis project ls_tempfiles() %>% unlink() ## remove all temp files in analysis project
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.