Skip to contents

This function reads all Runsalt output files in a specified folder, processes them, and returns a combined tidy dataframe. It applies the tidyRunsalt logic to each file, handling potential errors, and then row-binds all results into a single dataframe.

Usage

tidyRunsaltFolder(
  folder_path,
  X_col = "RH",
  Y_col = "mol",
  pattern = "\\.txt$"
)

Arguments

folder_path

folder_path A character string specifying the path to the folder

X_col

A character string specifying the X column variable. Default is "RH".

Y_col

A character string specifying the Y column variable. Default is "mol".

pattern

A character string specifying the file pattern to match.

Value

A tibble with columns:

  • Salt The type of salt

  • RH Relative Humidity (or the specified X_col)

  • mol Moles of salt (or the specified Y_col)

  • filename The name of the input file

Examples

if (FALSE) { # \dontrun{
result <- tidyRunsaltFolder("path/to/folder/with/runsalt/outputs")
head(result)
} # }