Description Usage Format Source Examples
Diversity of zooplankton (zooplankton
) prey in each of 5 replicate blocks (block
) of three treatment levels (treatment
). By default, block
is not coded as a factor.
1 |
A data frame with 15 observations on the following 3 variables.
treatment
a factor with levels control
, high
, and low
zooplankton
a numeric vector
block
a numeric vector
inferred from Svanbäck, R. and D.I. Bolnick. 2007. Intraspecific competition drives increased resource use diversity within a natural population. Proceedings of the Royal Society of London Series B, Biological Sciences 274: 839-844.
1 2 3 4 5 6 7 8 9 | data(Zooplankton)
Zooplankton
Zooplankton$block <- factor(Zooplankton$block)
str(Zooplankton)
aov.fit <- aov(zooplankton ~ block + treatment,
data = Zooplankton)
summary(aov.fit)
|
Loading required package: nlme
Loading required package: lattice
Loading required package: grid
Loading required package: mosaic
Loading required package: dplyr
Attaching package: 'dplyr'
The following object is masked from 'package:nlme':
collapse
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Loading required package: ggformula
Loading required package: ggplot2
Loading required package: ggstance
Attaching package: 'ggstance'
The following objects are masked from 'package:ggplot2':
GeomErrorbarh, geom_errorbarh
New to ggformula? Try the tutorials:
learnr::run_tutorial("introduction", package = "ggformula")
learnr::run_tutorial("refining", package = "ggformula")
Loading required package: mosaicData
Loading required package: Matrix
The 'mosaic' package masks several functions from core packages in order to add
additional features. The original behavior of these functions should not be affected by this.
Note: If you use the Matrix package, be sure to load it BEFORE loading mosaic.
Attaching package: 'mosaic'
The following object is masked from 'package:Matrix':
mean
The following object is masked from 'package:ggplot2':
stat
The following objects are masked from 'package:dplyr':
count, do, tally
The following objects are masked from 'package:stats':
IQR, binom.test, cor, cor.test, cov, fivenum, median, prop.test,
quantile, sd, t.test, var
The following objects are masked from 'package:base':
max, mean, min, prod, range, sample, sum
treatment zooplankton block
1 control 4.1 1
2 low 2.2 1
3 high 1.3 1
4 control 3.2 2
5 low 2.4 2
6 high 2.0 2
7 control 3.0 3
8 low 1.5 3
9 high 1.0 3
10 control 2.3 4
11 low 1.3 4
12 high 1.0 4
13 control 2.5 5
14 low 2.6 5
15 high 1.6 5
'data.frame': 15 obs. of 3 variables:
$ treatment : Factor w/ 3 levels "control","high",..: 1 3 2 1 3 2 1 3 2 1 ...
$ zooplankton: num 4.1 2.2 1.3 3.2 2.4 2 3 1.5 1 2.3 ...
$ block : Factor w/ 5 levels "1","2","3","4",..: 1 1 1 2 2 2 3 3 3 4 ...
Df Sum Sq Mean Sq F value Pr(>F)
block 4 2.340 0.585 2.792 0.10103
treatment 2 6.857 3.429 16.366 0.00149 **
Residuals 8 1.676 0.209
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.