Skip to contents

Reads a Runsalt output file and returns a tidy tibble. The function processes the data by separating salt and variable information, pivoting it to long format, dropping missing values, and adding columns for relative humidity (RH), moles (mol), temperature, filename, and additional crystallisation and equilibrium indicators.

Usage

tidyRunsalt(ECOS_output, Temp_value = 20)

Arguments

ECOS_output

A character string specifying the path to the Runsalt output file. This file is typically obtained via Runsalt plot menu: Plot > Export Plot Data...

Temp_value

Numeric. Temperature in degrees Celsius. Default is 20.

Value

A tibble with the columns:

  • Salt: Salt type (character).

  • RH: Relative Humidity (numeric).

  • mol: Moles of salt (numeric).

  • Temp: Temperature value (numeric).

  • filename: Input file name (character).

  • Crystallisation: Relative Humidity value at crystallisation point (numeric; NA otherwise).

  • RH_eqm: Relative Humidity value at equilibrium points (numeric or empty string).

Examples

if (FALSE) { # \dontrun{
# Read Runsalt output file and tidy data
result <- tidyRunsalt("path/to/runsalt/output.txt")
head(result)

# Interactive file selection with custom temperature
tidyRunsalt(file.choose(), Temp_value = 15)
} # }