read_alec: Read ALEC instruments data

View source: R/read_alec.R

read_alecR Documentation

Read ALEC instruments data

Description

This function can read the CEM and CKU data files.

Usage

read_alec(filename, ...)

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.

...

further arguments passed to read_csv or read_xlsx

Details

For CEM files, when the absolute x- and y- velocities are below 0 or above 200, all data are NA.

For CKU files, when the chlorophyll data is below 0 or above 400, the value is set to NA. When turbidity is below 0 or above 1000, the value is set to NA.

For both CEM and CKU files, When the temperature is below 0 or above 40, all data are NA.

Value

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

Returned variables

datetime

Date-time

speed

Current speed (cm / s)

dir

Current direction (radians)

ew

East-West velocity (cm / s)

ns

North-South velocity (cm / s)

chla

Chlorophyll-a (μg / L)

turbidity

Turbidity (FTU, Formazin Nephelometric Units)

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, "CEM")) %>% slice(1) %>% pull(fnames) %>% read_alec()
df %>% filter(str_detect(fnames, "CKU")) %>% slice(1) %>% pull(fnames) %>% read_alec()

## End(Not run)


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