Learn R Programming

oce (version 0.2-1)

write.ctd: Write a CTD data object as a .csv file

Description

Write a CTD data object as a .csv file.

Usage

write.ctd(object, file=stop("'file' must be specified"))

Arguments

object
A ctd object, e.g. as read by read.ctd.
file
Either a character string (the file name) or a connection. This is a mandatory argument.

Details

Writes a comma-separated file containing the data frame stored in object$data. The file is suitable for reading with a spreadsheet, or with read.csv. Note that the output file will retain none of the meta-data stored in object.

Examples

Run this code
library(oce)
data(ctd)
write.ctd(ctd, "ctd.csv")
x <- read.csv("ctd.csv")
plot(as.ctd(x$salinity, x$temperature,x$pressure))

Run the code above in your browser using DataLab