molaR_Batch: Run molaR analyses on a batch of specimens

View source: R/molaR_Batch.R

molaR_BatchR Documentation

Run molaR analyses on a batch of specimens


A function that automates molaR analyses on multiple specimens. Several different analyses can be performed on each surface, with specifications for analysis parameters.


  pathName = getwd(),
  fileName = "molaR_Batch.csv",
  OPCr = TRUE,
  Slope = TRUE,
  details = TRUE,
  parameters = TRUE,



The path to the folder containing all ply surfaces to be analyzed. Defaults to the working directory.


Name for the output .csv file containing results and parameters


Logical indicating whether or not to perform the DNE calculation


Logical indicating whether or not to perform the RFI calculation


Logical indicating whether or not to perform the OPCr calculation


Logical indicating whether or not to perform the OPC calculation


Logical indicating whether or not to perform the Slope calculation


Logical indicating whether or not to save additional output from some of the topographic analyses


Logical indicating whether or not to save the list of analysis parameters used in the batch run


Additional arguments passed to the topographic analysis functions. See Details.


This function allows a user to set the analyses from molaR they want to run on a batch of ply files. Output is saved to a csv file. By default, the batch function will perform specified analyses on all ply files in the working directory. A different folder can be specified with pathName. Output saves as .csv to the folder that contains the analyzed ply files.

Any of the default arguments of the various topographic analysis functions can be modified for the batch by specifying them when calling molaR_Batch, e.g., the DNE kappa value can be changed to 'X' by specifying kappa = X. Users are strongly encouraged to review the documentation for DNE(), RFI(), OPCr(), OPC(), and Slope() and to understand the effects of alterations before making changes. A recommended practice for analyzing RFI in a batch of specimens is to enable findAlpha = TRUE given that the ideal alpha value is likely to vary among different specimens. However, this will increase calculation time (see documentation for RFI).

By default, the batch output will retain some additional details of the analysis. These include, in the case of DNE: convex and concave DNE values, convex and concave surface areas; in the case of RFI: 3D and 2D surface areas and analysis alpha values; in the case of OPCr: the surface OPC value calculated at each rotation; and in the case of OPC: the patch count for each bin. These results will be discarded and only the final result of each topographic analysis will be retained if details = FALSE.

The function will save a list of all parameters used in all batch analyses to the output .csv file, below the results. This can be suppressed with parameters = FALSE, but is recommended as a check on how analyses were performed when returning to results in the future. If the function is assigned to an object in R, the parameters are not included in the resultant data.frame, but will still be included in the .csv file by default.

Note that batch processing updates will not display by default if using RGui for Windows. Disable Misc -> Buffered output (Ctrl+W) if you wish to view batch processing progress in RGui for Windows.

molaR documentation built on Feb. 16, 2023, 10:33 p.m.