pick | R Documentation |
pick
plots up series of light data agains record ID, allowing the user to click on the
beginnings and ends of twilight in sequence. picksegs
generates a vector
of segment IDs for each record.
pick(id, val, nsee = 10000)
picksegs(twind, n)
id |
index vector to identify records |
val |
sequence of data (light levels) to choose segments from |
nsee |
number of points to plot per screen |
twind |
vector of index pairs generated by |
n |
Number of segments values required - length of record |
pick
returns a vector where each value (obtained using locator
is the x coordinate for the begin or end of a twilight.
picksegs
uses these paired indexes to return a vector of segment IDs, with NAs
for non-twilight periods.
Segments are expected to be chosen as non-overlapping.
It seems best to choose more of the light data than less, using the
ekstrom
keyword to solar.model
we can limit the solar
elevation used.
Michael D. Sumner
d <- sin(seq(0, 10, by = 0.01))
id <- 1:length(d)
## choose a series of start-begin pairs
if (interactive()) {
pk <- pick(id, d, 1000)
## your start/ends should be marked as blue versus red
plot(id, d, col = c("red", "blue")[is.na(picksegs(pk, 1000))+1])
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.