TDR-accessors: Coerce, Extractor, and Replacement methods for class "TDR"...

Description Show Method Coerce Methods Extractor Methods Replacement Methods Author(s) See Also Examples

Description

Basic methods for manipulating objects of class TDR.

Show Method

show

signature(object="TDR"): print an informative summary of the data.

Coerce Methods

as.data.frame

signature(x="TDR"): Coerce object to data.frame. This method returns a data frame, with attributes “file” and “dtime” indicating the source file and the interval between samples.

as.data.frame

signature(x="TDRspeed"): Coerce object to data.frame. Returns an object as for TDR objects.

as.TDRspeed

signature(x="TDR"): Coerce object to TDRspeed class.

Extractor Methods

[

signature(x="TDR"): Subset a TDR object; these objects can be subsetted on a single index i. Selects given rows from object.

getDepth

signature(x = "TDR"): depth slot accessor.

getCCData

signature(x="TDR", y="missing"): concurrentData slot accessor.

getCCData

signature(x="TDR", y="character"): access component named y in x.

getDtime

signature(x = "TDR"): sampling interval accessor.

getFileName

signature(x="TDR"): source file name accessor.

getTime

signature(x = "TDR"): time slot accessor.

getSpeed

signature(x = "TDRspeed"): speed accessor for TDRspeed objects.

Replacement Methods

depth<-

signature(x="TDR"): depth replacement.

speed<-

signature(x="TDR"): speed replacement.

ccData<-

signature(x="TDR"): concurrent data frame replacement.

Author(s)

Sebastian P. Luque spluque@gmail.com

See Also

extractDive, plotTDR.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(divesTDR)

## Retrieve the name of the source file
getFileName(divesTDR)
## Retrieve concurrent temperature measurements
temp <- getCCData(divesTDR, "temperature"); head(temp)
temp <- getCCData(divesTDR); head(temp)

## Coerce to a data frame
dives.df <- as.data.frame(divesTDR)
head(dives.df)

## Replace speed measurements
newspeed <- getSpeed(divesTDR) + 2
speed(divesTDR) <- newspeed

diveMove documentation built on May 2, 2019, 4:47 p.m.