Description Usage Arguments Details Value Examples
View source: R/barplot.encounterDuration.r
Given the result from a call to encounterDuration
, this function draws a barplot. The plot contains one group of bars for each pair of IDs or bursts in the data (depending on the type of data). Each group contains a bar for each model for which the encounter duration was computed.
1 2 |
height |
The object containing the duration of encounters. |
col |
The colours to use in the plot. By default, takes colours with equally spaced hues in the |
units |
The unit used on the y axis of the plot. Must be a unit accepted by |
... |
Other graphical parameters, e.g. from |
If height
is an array, i.e. it was the result from a call to encounterDuration
with groupBy=NULL
, the name displayed under each pair of bars are the names of the IDs involved, separated by a hyphen.
Otherwise, you may specify the labels yourself in the row names of height
(which is a data.frame
). If all labels are numeric, this function replaces them by the names of the bursts involved, separated by a hyphen.
The return value is the same as what barplot.default
returns, i.e. a vector or matrix indicating the coordinates of bar midpoints.
1 2 3 4 | data("vervet_monkeys", package="moveBB")
ed <- encounterDuration(monkey.tr, 100, groupBy="GroupID")
barplot(ed)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.