Skip to contents

Reads all Runsalt output files in a specified folder, applies the tidyRunsalt logic to each file, and combines the results into a single tidy dataframe. Handles potential errors gracefully and binds all results row-wise for analysis.

Usage

tidyRunsaltFolder(folder_path, pattern = "\\.txt$", Temp_value = 20)

Arguments

folder_path

Character. Path to the folder containing Runsalt output files.

pattern

Character. Regex pattern to match output files (default is "\.txt$").

Temp_value

Numeric. Temperature in degrees Celsius (default is 20).

Value

A tibble with columns:

  • Salt The type of salt

  • RH Relative Humidity

  • mol Moles of salt

  • filename Name of the input file

  • Temp Temperature

  • Crystallisation Crystallisation point label

  • RH_eqm Equilibrium RH label

Additional columns may be present depending on processing.

Examples

if (FALSE) { # \dontrun{
# Combine and tidy all Runsalt output files from a folder
combined <- tidyRunsaltFolder("path/to/folder/with/runsalt/files")
head(combined)
} # }