Description Usage Arguments Value Author(s) See Also Examples
View source: R/calculate.landmarks.R
given a peak contour, event ids, and landmark ids, aggregates the contour into a data frame that contains landmarks sets for each event
1 | calculate.landmarks(peaks, evs.and.lmrks)
|
peaks |
a data frame containing a description of peak contours |
evs.and.lmrks |
a data frame containing an event factor and a landmark factor |
a data frame with a bunch of shiny landmark measurements
Benjamin N. Taft ben.taft@landmarkacoustics.com
make.peaks
assign.to.landmarks
detect.events
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (peaks, evs.and.lmrks)
{
fa <- is.finite(evs.and.lmrks$event)
landmarks <- aggregate(peaks$time[fa], evs.and.lmrks[fa,
], min)
names(landmarks)[3] <- "start.time"
landmarks <- cbind(landmarks, aggregate(peaks[fa, 1:8], evs.and.lmrks[fa,
], mean)[, -(1:2)])
landmarks$time <- landmarks$time - landmarks$start.time
landmarks <- landmarks[order(landmarks$event, landmarks$landmark),
]
return(invisible(landmarks))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.