## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----setup--------------------------------------------------------------------
library(wrictools)

## -----------------------------------------------------------------------------
# Example file included with the package
filepath <- system.file("extdata", "data.txt", package = "wrictools")

# Analyse zero test
zero_stats <- analyse_zero_test(filepath)

print(zero_stats)

## -----------------------------------------------------------------------------
# Example WRIC file
data_txt <- system.file("extdata", "data.txt", package = "wrictools")

# Made up methanol measurements to show functionality
methanol_df <- data.frame(
  datetime = as.POSIXct(c(
    "2023-11-13 22:00", "2023-11-13 23:30", "2023-11-14 03:00", "2023-11-14 06:00", "2023-11-14 08:00"
  ), format = "%Y-%m-%d %H:%M"),
  methanol = c(4842.9, 4785.7, 4758.6, 4675.1, 4629.2)
)
methanol_file <- tempfile(fileext = ".csv")
write.csv(methanol_df, methanol_file, row.names = FALSE)

# Analyse methanol burn
methanol_results <- analyse_methanol_burn(filepath = data_txt, methanolfilepath = methanol_file)

print(methanol_results)

