read_onset: Read Onset data

View source: R/read_onset.R

read_onsetR Documentation

Read Onset data

Description

This function reads some of the dataloggers from Onset Inc. The loggers that can be read are the U26 dissolved oxygen logger, the U24 salinity logger, the U20 water depth logger, and the USB Microstation with the wind speed, air pressure, PAR, and insolation sensors.

Usage

read_onset(
  filename,
  locale = Sys.setlocale("LC_TIME", "ja_JP.UTF-8"),
  skip = 1,
  ...
)

Arguments

filename

the name of the file which the data are to be read from. It can be a CSV file or an XLSX file.

locale

the locale to be used. On linux systems use system("locale -a") to list all of the installed locales. Typically for our systems in the lab, use ja_JP.UTF-8 for a Japanese locale and en_US.UTF-8 for an American English locale. The parameter default is locale = Sys.setlocale("LC_TIME", "ja_JP.UTF-8")

skip

the numeber of lines to skip. Default is 1.

...

further arguments passed to read_csv or read_xlsx

Details

When the water temperature and dissolved oxygen values are below 0 and above 40, the value is set to NA. When the values of any of the other variables are below 0, the value is set to NA.

Value

A tibble containing the data. The contents of the tibble depend on the data file.

Returned variables

datetime

Date-time

mgl

Dissolved oxygen (mg / L)

wind

Wind speed (m / s)

gust

Wind gust (m / s)

ppfd

Photosynthetically active radiation, PAR (\mumol photons / m^2 / L)

insolation

Insolation (W / m^2)

lux

Illuminance (lux)

mbar

Depth (mbar)

kPA or psi

Air pressure at sea-level (kPa or psi)

hr_conductance

High range conductivity (\muS / cm)

spc

Specific conductance (\muS / cm)

temperature

Water temperature (^\circC)

Examples

## Not run: 
fnames = dir("~/Lab_Data/kawatea/", full.names=TRUE, recursive=TRUE)
df = tibble(fnames = fnames)#'
df %>% filter(str_detect(fnames, "DO")) %>% slice(1) %>% pull(fnames) %>% read_onset()
df %>% filter(str_detect(fnames, "Microstation")) %>% slice(1) %>% pull(fnames) %>% read_onset()
df %>% filter(str_detect(fnames, "Depth")) %>% slice(1) %>% pull(fnames) %>% read_onset()
df %>% filter(str_detect(fnames, "Salinity")) %>% slice(1) %>% pull(fnames) %>% read_onset()
df %>% filter(str_detect(fnames, "Temperature")) %>% slice(1) %>% pull(fnames) %>% read_onset()

## End(Not run)


gnishihara/gnnlab documentation built on April 13, 2025, 5:48 p.m.