Description Usage Format Examples
The plants are in a 100 x 100 grid and display a moderate amount of clustering. The grid is divided into 16 25x25 Quadrats, or 100 10x10 Plots. The data is give as the number of individual plants in a 1x1 grid cell.
1 |
A data frame with 10,000 rows and 6 variables:
The x coordinate of a 1x1 grid cell.
The y coordinate of a 1x1 grid cell.
Which 25x25 quadrant the grid cell is in [a-p].
Which 10x10 plot the grid cell is in [1-100].
A unique identifier of the 1x1 grid cell [1 - 10,000].
The number of plants within a site.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | library(ggplot2)
library(dplyr)
data(Plant.Pop)
NonZero <- Plant.Pop %>% filter( count >= 1 )
ggplot( NonZero, aes(x=x, y=y, color=count)) +
geom_point(alpha=.3)
# Aggregate over quadrants
Plant.Quads <- Plant.Pop %>%
group_by(Quadrant) %>%
summarize(x=mean(x),
y=mean(y),
count=sum(count))
ggplot(Plant.Quads, aes(x=x, y=y)) +
geom_point(data=Plant.Pop, alpha=.3, aes(color=count)) +
geom_text(aes(label=Quadrant))
# Aggregate over plots
Plant.Plots <- Plant.Pop %>%
group_by(Plot) %>%
summarize(x=mean(x),
y=mean(y),
count=sum(count))
ggplot(Plant.Plots, aes(x=x, y=y)) +
geom_point(data=Plant.Pop, alpha=.3, aes(color=count)) +
geom_text(aes(label=Plot))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.