View source: R/helper_functions.R
find_best_spar | R Documentation |
Function recovers a record 21 separate times, between 0 and 1 with increments of 0.05 and assess how each change in spar value influences the dive statistics gathered by the record. It also finds the ideal spar value for that record by assessing changes in bottom distance. This function will take a while to run because it is recovering the same record multiple times, calibrating it, and retrieving the dive statistics. However, I believe this is the best method for finding the best spar value.
find_best_spar(
filepath_trace = "WS_25_1981_trace.csv",
filepath_timedots = "WS_25_1981_time_dots.csv",
filepath_args = "WS_25_1981_args.csv",
filepath_results = system.file("extdata", "WS_25_1981", package = "recoverKBTDR")
)
filepath_trace |
file path of raw trace csv file |
filepath_timedots |
file path of raw time dots csv file |
filepath_args |
file path of csv file containing:
|
filepath_results |
directory where you would like to store csv files of each spar scenario |
folder in /results that contains a csv for all spar scenarios, a dive_stats data frame containing all dive stats for each spar scenario to the global environment, and the best spar value to use for this record.
## Not run:
filepath <- system.file("extdata", "WS_25_1981", package = "recoverKBTDR")
filepath_trace <- paste(filepath, "WS_25_1981_trace.csv", sep = "/")
filepath_timedots <- paste(filepath, "WS_25_1981_time_dots.csv", sep = "/")
filepath_args <- paste(filepath, "WS_25_1981_args.csv", sep = "/")
find_best_spar(filepath_trace, filepath_timedots, filepath_args, filepath_results = filepath)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.