View source: R/rename_mcmc_filenames.R
rename_mcmc_filenames | R Documentation |
Rename the filenames within an MCMC
rename_mcmc_filenames(mcmc, rename_fun)
mcmc |
one MCMC.
Use |
rename_fun |
a function to rename a filename, as can be checked by check_rename_fun. This function should have one argument, which will be a filename or NA. The function should return one filename (when passed one filename) or one NA (when passed one NA). Example rename functions are:
|
an 'mcmc' (see create_mcmc) with renamed filenames
check_empty_beautier_folder()
# Create an MCMC with local filenames
mcmc <- create_mcmc()
mcmc$tracelog$filename <- "trace.log"
mcmc$screenlog$filename <- "screen.log"
mcmc$treelog$filename <- "tree.log"
# Nah, files should be put in '/home/john' folder
mcmc <- rename_mcmc_filenames(
mcmc = mcmc,
rename_fun = get_replace_dir_fun("/home/john")
)
# Nah, files should be put in '/home/doe' folder instead
mcmc <- rename_mcmc_filenames(
mcmc = mcmc,
rename_fun = get_replace_dir_fun("/home/doe")
)
# Nah, files should be put in local folder instead
mcmc <- rename_mcmc_filenames(
mcmc = mcmc,
rename_fun = get_remove_dir_fun()
)
check_empty_beautier_folder()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.