---
title: "Introduction to respirometr"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Introduction to respirometr}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

# Get Started with respirometr

## Introduction

The respirometr package provides tools for processing and analyzing respirometry data from LI-COR gas analyzers. It currently supports data from LI-850 and LI-7000 analyzers, making it easier to work with these common instruments in R.

## Installation

You can install respirometr from GitHub:

```{r eval=FALSE}
# install.packages("devtools")
devtools::install_github("roaldarbol/respirometr")
```

## Basic Usage

First, load the package:

```{r eval=FALSE}
library(respirometr)
```

### Reading Data Files

The package provides specialized functions for reading data from different LI-COR analyzers:

```{r eval=FALSE}
# Read data from a LI-850 analyzer
li850_data <- read_licor_li850("path/to/LI850.txt")

# Read data from a LI-7000 analyzer
li7000_data <- read_licor_li7000("path/to/LI7000.txt")
```

These functions automatically:
- Handle the specific file formats of each analyzer
- Clean column names for easier use in R
- Remove columns with NA values
- Convert time to a standardized format

### Normalizing Data

The package provides two methods for normalizing drift in measurements:

```{r eval=FALSE}
# Using linear interpolation between means
normalized_data <- normalise_drift_means(
  data = measurements,
  pre = pre_measurement_values,
  post = post_measurement_values
)

# Using linear regression
normalized_data <- normalise_drift_lm(
  data = data,
  data_pre = pre_measurements,
  data_post = post_measurements,
  colname_time = "time",
  colname_measure = "co2d_um_m"
)
```


## Next Steps

- Check out the [reference documentation](link_to_reference) for detailed information about each function
- See the [articles section](link_to_articles) for in-depth tutorials and examples
- Visit the [GitHub repository](link_to_github) for the latest updates and to report issues
