import_witrox: Import data from a Loligo Systems Witrox O2 transmitter

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/import_witrox.R

Description

Imports the standard txt file output from Loligo Systems Witrox fiber optic O2 transmitters and converts the data into one or more data frames.

Usage

1
2
3
import_witrox(file, o2_unit = "percent_a.s.",
  date = "%m/%d/%Y %I:%M:%S %p", overwrite_sal = NULL,
  drop_channels = TRUE, split_channels = FALSE)

Arguments

file

a character string. The filepath for the file to be read.

o2_unit

a character string. The unit of O2 measurement to be output in the data frame. Options are described in conv_o2.

date

a character string. The date format to be passed to strptime.

overwrite_sal

Default NULL. To overwrite the salinity value(s) from calibration, enter a single numeric value for all channels or a numeric vector with values for each channel. Salinity of water sample (psu).

drop_channels

logical. Should channels without any O2 data be dropped? Default is TRUE.

split_channels

logical. Should a list of data frames be returned with a separate data frame for each channel? Default is FALSE.

Details

The following Loligo Systems fiber optic O2 transmitters are supported:

If you would like support for the Witrox 1, email me a data file from this device.

Value

A data frame (or list of data frames) is returned.

TIME

Date and time, POSIXlt format.

DURATION

Duration of measurement trial (minutes).

ATM_PRES

Atmospheric pressure (mbar).

CH_X_PHASE

Phase recorded. Phase is inversely related to O2.

CH_X_TEMP

Temperature recorded or defined at beginning of measurement trial.

CH_X_SAL

Salinity (psu).

CH_X_O2

Oxygen measurement in desired unit as determined by o2_unit.

...

Channel columns (CH_...) are repeated for each channel.

If split_channels = TRUE, then "CH_X_" is removed from the column names and multiple data frames are returned in a list.

Author(s)

Matthew A. Birk, [email protected]

See Also

import_firesting, import_presens, conv_o2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
file <- system.file('extdata', 'witrox_file.txt', package = 'respirometry')
import_witrox(file, o2_unit = 'umol_per_l')

# Oops. I forgot to change the salinity value when I calibrated
# the instrument. Override the values in the file for 35 psu.
import_witrox(file, o2_unit = 'umol_per_kg', overwrite_sal = 35)

# I want each channel as a separate data frame.
data_list <- import_witrox(file, split_channels = TRUE)
data_list$CH_3 # here's the channel 3 data frame.

## End(Not run)

respirometry documentation built on Nov. 17, 2017, 4:50 a.m.