forked from RyanLab/microclimloggers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
88 lines (66 loc) · 2.43 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
title: microclimloggers
output:
md_document:
variant: markdown_github
---
```{r chunk_opts, echo=FALSE}
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
warning = FALSE,
message = FALSE,
fig.width = 10,
fig.path = "inst/img/",
cache.path = "inst/cache/"
)
```
[![R](https://github.com/RyanLab/microclimloggers/actions/workflows/r.yml/badge.svg)](https://github.com/RyanLab/microclimloggers/actions/workflows/r.yml)
`microclimloggers`: Data Wrangling Functions For Microclimate Loggers
An R package to process various microclimate logger data formats. Functions are provided to parse and reshape microclimate logger data (e.g. iButton, iButton Hygrochron, HOBO pendant loggers [temperature, humidity, light]) that are commonly used in the environmental and biological sciences.
## Installation
Install `microclimloggers` from GitHub:
```{r eval=FALSE}
install.packages("devtools")
devtools::install_github("RyanLab/microclimloggers")
```
## Examples
Load `microclimloggers` package:
```{r}
library("microclimloggers")
```
Get the path of an example file (HOBO RH Logger)
```{r}
hobo_example_path <- system.file("extdata", "HOBO_RH_logger.csv", package = "microclimloggers")
```
Parse the file
```{r}
hobo_data <- read_hobo_csv(hobo_example_path)
```
Plot the file
```{r}
plot(hobo_data)
```
The `read_hobo_csv` function has additional features. It flexibly handles any combination of temperature, humidity, and light.
```{r}
# logger deployed at ground level over winter to measure snowmelt date
templight_path <- system.file("extdata", "HOBO_LIGHT_logger.csv", package = "microclimloggers")
templight_data <- read_hobo_csv(templight_path)
plot(templight_data) # snow melted in late April
```
It also reports the units of measurement...
```{r}
templight_data$df_units
```
...and allows for conversion between measurement systems during data import.
```{r}
templight_imperl <- read_hobo_csv(templight_path, units_out = "imperial")
plot(templight_imperl)
```
All other functions assume that metric units are used.
## Meta
* Please [report any issues or bugs](https://github.com/pboesu/microclimloggers/issues).
* License: GPL-3
* Get citation information for `microclimloggers` in R doing `citation(package = 'microclimloggers')`
##Funding
* This work was supported by funding from [NSF grant DEB-1641145](https://nsf.gov/awardsearch/showAward?AWD_ID=1641145) and [NSF grant DEB-1518681](https://nsf.gov/awardsearch/showAward?AWD_ID=1518681)