View source: R/make_simulation_directory.R
make_simulation_directory | R Documentation |
The function make_simulation_directory
will create a
data.frame of simulations in a given project folder, the associated XML
files when applicable (you'll have to provide that information with the
argument existing_exp_details
or else ask this function to read all
the workspace files to find them), and, optionally, save that data.frame to
an Excel file. It will also check whether the file names comply with USFDA
and Consultancy Team standards and check whether the same simulation is
saved in more than one place.
This is wicked fast.*
*Caveat: Unless you search all the workspaces for XML observed overlay data files. Then it takes about 2 seconds per simulation.
make_simulation_directory(
project_folder = NA,
sim_data_files = "recursive",
existing_exp_details = NA,
search_workspaces_for_obsfile = FALSE,
use_basename_for_obsfile = FALSE,
save_table = NA,
overwrite = "ask"
)
project_folder |
location of the project folder to search. Please note that R requires forward slashes ("/") in file paths rather than the back slashes Microsoft uses. If left as NA (default), we'll assume your current working directory is the top level of your project folders. |
sim_data_files |
which files to include in the directory of simulations.
This only applies when you don't supply anything for the argument
|
existing_exp_details |
optionally supply the output from running
|
search_workspaces_for_obsfile |
TRUE or FALSE (default) for whether to search through any workspace files and check for possible XML overlay files. This runs considerably slower when set to TRUE and will take about an additional 2 seconds per simulation. If you have supplied something for 'existing_exp_details', you don't need this and we'll ignore it if you set this to TRUE. |
use_basename_for_obsfile |
TRUE or FALSE (default) for whether to remove the folder name from the observed overlay XML file name. By default, we'll list the XML file where it was located when the workspace was saved. However, if you set this to TRUE, we'll only list the file name without the path. Why would you want this? Say you've moved all your XML observed overlay files from their original locations when you ran the simulations into a new folder that you'll be sharing with the client at the end of the project. This way, you can show which simulation had which XML observed overlay file without the confusion of including the original path. |
save_table |
optionally specify an Excel file name for saving your simulation directory. If you don't include the file extension ".xlsx", we'll add it. |
overwrite |
Should we overwrite if your Excel file already exists and already has a tab named "Simulation directory"? Options are "yes" to always overwrite, "no" to never overwrite, or "ask" (default), which means that we will ask you whether to overwrite and give you a chance to supply a different file name if the one you supplied already exists. |
a data.frame of simulation files and their respective file paths
# none yet
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.