read.ctd.ios.text: Read a CTD file in an IOS text format

View source: R/read.ctd.ios.R

read.ctd.ios.textR Documentation

Read a CTD file in an IOS text format

Description

The read.ctd.ios.text() function reads CTD data in a text format used by the Institution of Ocean Sciences, of the Department of Fisheries and Oceans, Canada. Lacking a document from IOS describing the format, the code is written based on inspection of a particular file, and for this reason, it cannot be trusted deeply.

Usage

read.ctd.ios.text(filename, missingValue = NULL, debug = 0)

Arguments

filename

character value specifying the file name. This must end in ".ctd".

missingValue

numeric value that is to be converted to NA. If this is NULL, the default, then an attempt to infer a reasonable value is made by examining information stored in the file.

debug

integer value controlling the printing of information that may help in debugging problems. The default, 0, means to work silently; positive values mean that some information should be printed.

Value

read.ctd.ios.text() returns an oce object of class ctd.

Development note

This function was written on 2021-02-06, based on the examination of a single test file. Since this is a risky way to code, efforts are underway to find official documentation for the file format. If such documentation becomes available, the function will be changed accordingly.

Author(s)

Dan Kelley

References

https://catalogue.cioos.ca/dataset/ios_ctd_profiles

Examples

library(dfo)
# File provided to author by a colleague.
file <- system.file("extdata", "2007-019-055.ctd", package="dfo")
ctd <- read.ctd.ios(file)
summary(ctd)
plot(ctd)


dankelley/dfo documentation built on Nov. 21, 2022, 2:35 a.m.