TDR-accessors {diveMove} | R Documentation |
Coerce, Extractor, and Replacement methods for class "TDR" objects
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 forTDR
objects.- as.TDRspeed
signature(x="TDR")
: Coerce object toTDRspeed
class.
Extractor Methods
- [
signature(x="TDR", i="numeric", j="missing", drop="missing")
: 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 forTDRspeed
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
Examples
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