incRplot {incR} | R Documentation |
Quick visualisation of incubation temperatures, on-bouts and off-bouts
Description
After incRscan
has been used, incRplot
provides a quick visualisation of the incubation temperature trace with coloured
on- and off-bouts. Environmental temperatures can also be added to the plot
Usage
incRplot(
data,
time.var,
day.var,
inc.temperature.var,
env.temperature.var = NULL,
vector.incubation
)
Arguments
data |
data table with incubation temperature data |
time.var |
Character string. Name of the variable with time of the day for
temperature data. Please, have time in
decimal hours. If |
day.var |
Character string. Name of the variable with date for
temperature observation. No specific format is needed.
If |
inc.temperature.var |
Character string. Name of the variable with incubation temperatures. |
env.temperature.var |
Character string. Name of the variable with environmental temperatures. If no value is provided, a plot with no environmental temperatures is produced. |
vector.incubation |
name of the binary variable storing
information about the presence/absence of the incubating individual in the nest.
If |
Value
Plot of incubation temperature, on-bouts and off-bouts with (optional)
environmental temperatures. The plot is generated using ggplot2
.The
user can customised the appearance of the plot using tools
within ggplot2
(see example)
See Also
Examples
# loading example data
data(incR_procdata)
my_plot <- incRplot(data = incR_procdata[complete.cases(incR_procdata$temperature),],
time.var = "dec_time",
day.var = "date",
inc.temperature.var = "temperature",
env.temperature.var = "env_temp",
vector.incubation = "incR_score")
# see your plot
my_plot
# add new labels (ggplot2 required)
my_plot + ggplot2::labs(x = "New X label", y = "New Y label")