Learn R Programming

bumbl (version 1.0.3)

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

Description

Creates one plot per level of colonyID showing the observed (points) and fitted (red line) values from the model implemented by bumbl().

Usage

# S3 method for bumbldf
plot(x, ..., colony = NULL)

Value

invisibly returns a list of dataframes used for building the plots.

Arguments

x

a dataframe produced by bumbl().

...

other arguments not used by this method.

colony

optional vector of colony ID's (character) or indexes (numeric) to plot. If not supplied, all colonies will be plotted.

See Also

bumbl(), autoplot.bumbldf()

Examples

Run this code
set.seed(687)
colonyID_subset <- sample(bombus$colony, 10)
colony_subset <- bombus[bombus$colony %in% colonyID_subset, ]
results <- bumbl(colony_subset, colonyID = colony, t = week,
                 formula = mass ~ week)
plot(results)

Run the code above in your browser using DataLab