Learn R Programming

oce (version 0.2-1)

read.oce: Read an oceanographic data file

Description

Read an oceanographic data file, auto-discovering the file type from the first line of the file.

Usage

read.oce(file, ...)

Arguments

file
a connection or a character string giving the name of the file to load.
...
arguments to be handed to whichever instrument-specific reading function is selected, based on the header.

Value

  • An object of base class "oce", and also with a class that signifies the type of data, e.g. "ctd", "sealevel", etc.

Details

This function tries to infer the file type from the first line, using magic. If it can be discovered, then an instrument-specific file reading function is called, with the file and with any additional arguments being supplied.

See Also

The file type is determined by magic. If the file type can be determined, then one of the following is called: read.ctd, read.coastline read.lobo, read.pt, read.sealevel, etc.

Examples

Run this code
library(oce)
x <- read.oce(system.file("extdata", "ctd.cnv", package="oce"))
plot(x) # summary with TS and profiles
plot.TS(x) # just the TS

Run the code above in your browser using DataLab