Learn R Programming

bumbl (version 1.0.3)

autoplot.bumbldf: Plot observed and fitted results from bumbl()

Description

Plots observed (points) and fitted (red line) values from the model implemented by bumbl(), faceted by colony.

Usage

# S3 method for bumbldf
autoplot(object, ..., colony = NULL, x = deprecated())

Value

invisibly returns a ggplot object

Arguments

object

a dataframe produced by bumbl()

...

other arguments passed to autoplot()

colony

a character vector of colony IDs to plot

x

[Deprecated] x has been re-named to object for consistency with other autoplot() functions

Examples

Run this code
bombus_subset <- bombus[bombus$colony %in% c("17", "104", "20", "24"), ]
results <- bumbl(bombus_subset, colonyID = colony, t = week,
                 formula = mass ~ week)
library(ggplot2)
autoplot(results)

Run the code above in your browser using DataLab