import_o2 {presens}R Documentation

Import data from PreSens O2 transmitter

Description

Imports the standard txt file output from most PreSens fiber optic O2 transmitters and converts the data into a data frame.

Usage

import_o2(file, o2_unit = "percent_a.s.", date = "%d/%m/%y",
  salinity = 35)

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:

percent_a.s. (percent air saturation)
percent_o2
hPa
kPa
torr
mmHg
inHg
mg_per_l
umol_per_l
ml_per_l
date

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

salinity

salinity of water sample (psu). Default is 35 psu.

Details

The following PreSens fiber optic O2 transmitters are supported:

Fibox 3
Fibox 3 trace
Fibox 3 LCD trace
Microx TX3
Microx TX3 trace
OXY-4 mini
OXY-4 micro
OXY-4 trace
OXY-10 mini
OXY-10 micro
OXY-10 trace

It is very important to note that the PreSens fiber optics O2 transmitters that are supported with this function DO NOT account for salinity (i.e. they assume salinity = 0 ppt). If the water sample measured was not fresh water, the oxygen concentrations (e.g. mg per liter or umol per liter) are incorrect in the PreSens txt file. This function corrects these O2 concentrations based on the salinity value defined by the salinity argument. Absolute partial pressures (i.e. hPa and torr) will also be slightly different due to the slight influence of salinity on water's vapor pressure. This difference is typically ~0.05% of the recorded value.

Value

A data frame with seven columns is returned.

TIME

Date and time, POSIXct format.

DURATION

Duration of measurement trial (minutes).

oxygen

Oxygen measurement in desired unit. Column name changes based on o2_unit argument.

PHASE

Phase recorded. Phase is inversely related to O2.

AMPLITUDE

Amplitude recorded. Amplitude is an indicator of the quality of the signal. A low amplitude warning is produced by the transmitter below 2500.

TEMPERATURE

Temperature recorded or defined at beginning of measurement trial.

ERROR_CODE

Error code from transmitter. See PreSens user manual for translation of error code.

Note

Conversions are estimates based on the marelac package and therefore differ slightly from the conversions provided by PreSens.

Author(s)

Matthew A. Birk, matthewabirk@gmail.com

See Also

last_o2

Examples

## Not run: 
file <- system.file('extdata', 'all_o2_units.txt', package = 'presens')
import_o2(file, o2_unit = 'umol_per_l', salinity = 25)

## End(Not run)


[Package presens version 2.1.0 Index]