rename_inference_model_filenames {beautier}  R Documentation 
Rename the filenames in an inference model
rename_inference_model_filenames(inference_model, rename_fun)
inference_model 
a Bayesian phylogenetic inference model. An inference model is the complete model setup in which a site model, clock model, tree prior and more are specified. Use create_inference_model to create an inference model. Use check_inference_model to check if an inference model is valid. Use rename_inference_model_filenames to rename the files in an inference model. 
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 inference model with the renamed filenames
check_empty_beautier_folder()
inference_model < create_inference_model()
inference_model$mcmc$tracelog$filename < "trace.log"
inference_model$mcmc$screenlog$filename < "screen.log"
inference_model$mcmc$treelog$filename < "tree.log"
inference_model$tipdates_filename < "tipdates.csv"
# Nah, put the files in a folder
inference_model < rename_inference_model_filenames(
inference_model = inference_model,
rename_fun = get_replace_dir_fun("/home/john")
)
# Nah, put the files in anoth folder
inference_model < rename_inference_model_filenames(
inference_model = inference_model,
rename_fun = get_replace_dir_fun("/home/doe")
)
# Nah, store the files locally
rename_inference_model_filenames(
inference_model = inference_model,
rename_fun = get_remove_dir_fun()
)
check_empty_beautier_folder()