R Dataset / Package datasets / InsectSprays


On this R-data statistics page, you will find information about the InsectSprays data set which pertains to Effectiveness of Insect Sprays. The InsectSprays data set is found in the datasets R package. You can load the InsectSprays data set in R by issuing the following command at the console data("InsectSprays"). This will load the data into a variable called InsectSprays. If R says the InsectSprays data set is not found, you can try installing the package by issuing this command install.packages("datasets") and then attempt to reload the data. If you need to download R, you can go to the R project website. You can download a CSV (comma separated values) version of the InsectSprays R data set. The size of this file is about 482 bytes.

Effectiveness of Insect Sprays


The counts of insects in agricultural experimental units treated with different insecticides.




A data frame with 72 observations on 2 variables.

R project statistics dataset table
[,1] count numeric Insect count
[,2] spray factor The type of spray


Beall, G., (1942) The Transformation of data from entomological field experiments, Biometrika, 29, 243–262.


McNeil, D. (1977) Interactive Data Analysis. New York: Wiley.


require(stats); require(graphics)
boxplot(count ~ spray, data = InsectSprays,
        xlab = "Type of spray", ylab = "Insect count",
        main = "InsectSprays data", varwidth = TRUE, col = "lightgray")
fm1 <- aov(count ~ spray, data = InsectSprays)
opar <- par(mfrow = c(2, 2), oma = c(0, 0, 1.1, 0))
fm2 <- aov(sqrt(count) ~ spray, data = InsectSprays)

Dataset imported from https://www.r-project.org.

Title Authored on Content type
OpenIntro Statistics Dataset - dream August 9, 2020 - 12:25 PM Dataset
OpenIntro Statistics Dataset - winery_cars August 9, 2020 - 2:38 PM Dataset
R Dataset / Package HSAUR / toothpaste March 9, 2018 - 1:06 PM Dataset
R Dataset / Package HSAUR / pottery March 9, 2018 - 1:06 PM Dataset
R Dataset / Package HistData / Guerry March 9, 2018 - 1:06 PM Dataset
<iframe src="https://r-data.pmagunia.com/iframe/r-dataset-package-datasets-insectsprays.html" frameBorder="0" width="100%" height="307px" />
Attachment Size
dataset-18087.csv 482 bytes
Dataset License
GNU General Public License v2.0
Documentation License
GNU General Public License v2.0

This documentation is licensed under GPLv3 or later.