View source: R/makeReceiverPlot.R
makeReceiverPlot | R Documentation |
The plot is an object of class trellis
which can then
be sent to an open plotting device using print()
.
Note: only detections with valid timestamps, i.e. after
1 Jan 2010, are shown.
makeReceiverPlot(recv, meta = NULL, title = "", condense = 3600,
ts = NULL, monoBN = NULL, antCol = c("#000000", "#0000ff", "#20bd00",
"#a617b8", "#fb7402", "#11d0e1", "#18770b", "#e7c00a", "#ff0000", "#5eff00",
"#a5a5a5"))
recv |
path or dplyr::src_sqlite to the receiver database |
meta |
path or dplyr::src_sqlite to the file with metadata; if
NULL (the default), assume metadata tables are in the database
given by |
title |
additional title to identify plot, beyond receiver serial number |
condense |
double scalar; if not NULL, specifies the condensation period: only the first detection of a given tag on a given antenna per condensation period is plotted. Default: 3600, meaning at most one detection of each tag on each antenna is shown per hour, and it will be the first for that hour. |
ts |
double vector of length 2; range of timestamps to plot; Default: NULL, meaning no restriction on timestamps. |
monoBN |
integer vector of length 2; range of boot sessions to plot; Default: NULL, meaning no restriction on boot sessions. |
antCol |
colours to use for each antenna, beginning with antenna number 0. Antenna numbers run from 0 to 10, so at most the first 11 elements are used. Default:
|
If both ts
and monoBN
are NULL, then all
detections in database recv
are plotted.
a list with these items:
width: recommended plot width, in pixels
height: recommended plot height, in pixels
plot: object of class trellis
; to generate a plot from
this:
open a graphics device, using the recommended width and height
print the plot
close the device
data: dataframe of the data plotted, with these columns
ant: antenna number
fullID full tag ID, or " Antenna N Status"; the latter
'detections' just indicate the antenna was functioning in the hour
centred on the timestamp. Also, a fullID of
" Reboot Odometer" indicate the approximate timestamps at
which the receiver rebooted, and the ant
field for these
records is the last digit of the boot session count.
bin: the bin number for condensation
ts: the timestamp at the start of the condensation bin
n: the number of detections (will be at least 1)
freq: the mean offset frequency of detections
sig: the maximum signal strength
However, if no data are available for the specified ts
and monoBN
parameters,
then the function returns NULL.
Note: n
, freq
, and sig
are for the given tag and antenna
during the condensation period.
John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.