Description Usage Arguments Details Value Examples
Splits Tire data files into multiple data files based on a passed parameter and saves the new files.
1 2 3 4 5 6 7 8 9 |
svRunPaths |
optional string vector. Defaults to 'NULL.' Complete file path of a tire raw data file. NULL opens a file dialog box for the user to select files. |
svRunNames |
optional string vector. Defaults to 'NULL.' String vector the same length as svRunPaths. Run names for your future reference. Used as titles for plots. Also gets recorded in summary table. Default 'NULL' uses the end of the file name. |
... |
named argument of a Numeric Vector containing at least two values, with name corresponding to a column name of a tire data file. Suggested Names: 'V', 'N', 'SA', 'IA', 'P', 'FZ', 'TSTC', 'SR'. |
verbose |
boolean. Defaults to 'TRUE'. True prints messages in the console, while false does not. |
bSaveBatchNames |
boolean. Defaults to 'FALSE'. 'TRUE' saves output to a csv file. |
k |
integer. Defaults to 10.
Rolling average window width. A rolling
average is applied to the named argument column before splitting.
set to 1 to disable. See 'k' from
|
nRowHeader |
see 'rRowHeader' from |
Opens each data file from svRunNames, then splits all of the data into the closest match in the splitting parameter argument. For example if the fitting parameter was 'P = c(50,60,80)', data points with pressures from 0-45 kPa would be dropped. 45-54 kPa would be put in the 50 kPa, 55-69 kPa would be in the 60kPa file, 70-90 kPa would be in the 80 kPa file, and data points with pressures of 91+ kPa would be dropped. If, after filtering, a file would contain less than 1 of the original data, then that file is skipped instead of writing a csv or recording it in the output dataframe. Note that even though units of 'psi' will appear in text output and file names, metric units (kPa) must be passed into the function, and kPa will be in the output files.
The tire data is read using the function named in the settings
'getOption(tirefittingr.sfReadTireFile)'. If the option is not set ('NULL'),
then the default function 'readTTCData' is used, which works for .dat
files from the TTC. For more on this option, see fitTires
.
Returns Dataframe of full-path run names of newly created runs. Second column contains copied 'svRunNames'.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
#split into files containing pressures 8, 10, 12, and 14 psi
#with a .dat TTC data file
lRunNamesSplit = splitTireDataAndSave( P = c(55.2,68.9,82.7,96.5))
#open a csv file, where the first column has complete file paths
#Note the file selection window often hides behind RStudio!
svFiles = read.csv(choose.files(), stringsAsFactors = FALSE)[,1]
if (!file.exists(svFiles[1])) {stop("File Doesn't Exist")} #check the file path is correct!
lRunNamesSplit = splitTireDataAndSave( P = c(55.2,68.9,82.7,96.5))
lRunNamesSplit = splitTireDataAndSave( P = 6.894*c(8,10,12,14))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.