Description Usage Format Examples
This data is a simulation of a multistage sample. The given scenario is that 31 boats enter a harbor on a given day and 12 different boats or selected for inspection. Aboard each boat, 20 lobsters are sampled and the length of the carapace is measured. Note that any lobster with carapace length less than 3 inches is legally required to be released unharmed at its capture site.
1 |
A data frame with 240 rows and 4 variables:
A variable denoting which boat.
The weight of all lobsters caught (by boat, in thousands of pounds).
A variable indicating which lobster.
Length of lobsters carapace.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(ggplot2)
data(Lobsters)
# Plot each boats Catch.Weight
ggplot(Lobsters, aes(x=Boat.ID, y=Catch.Weight)) +
geom_point()
# Plot the lobster lengths, by boat
ggplot(Lobsters, aes(x=Boat.ID, y=Lobster.Length)) +
geom_point()
ggplot(Lobsters, aes(x=factor(Boat.ID), y=Lobster.Length)) +
geom_boxplot()
# Plot Lobster Length versus the total Catch Weight
ggplot(Lobsters, aes(x=Catch.Weight, y=Lobster.Length)) +
geom_point()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.