R Dataset / Package Stat2Data / FruitFlies


On this Picostat.com statistics page, you will find information about the FruitFlies data set which pertains to FruitFlies. The FruitFlies data set is found in the Stat2Data R package. You can load the FruitFlies data set in R by issuing the following command at the console data("FruitFlies"). This will load the data into a variable called FruitFlies. If R says the FruitFlies data set is not found, you can try installing the package by issuing this command install.packages("Stat2Data") 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 FruitFlies R data set. The size of this file is about 3,605 bytes.



Sexual activity and lifetimes of fruit flies


A dataset with 125 observations on the following 7 variables.

ID a numeric vector
Partners Number of female partners: 0, 1, or 8
Type 0=pregnant, 1=virgin, 9=none
Longevity Lifespan (in days)
Thorax Length of thorax (in mm)
Sleep Percent of day sleeping
Treatment 1 pregnant, 1 virgin, 8 pregnant, 8 virgin, or none


Hanley and Shapiro (1994) report on a study conducted by Partridge and Farquhar (1981) about the sexual behavior of fruit flies. It was already known that increased reproduction leads to shorter life spans for female fruit flies. But the question remained whether an increase in sexual activity would also reduce the life spans of male fruit flies. The researchers designed an experiment to answer this question. They had a total of 125 male fruit flies to use and they randomly assigned each of the 125 to one of the following five groups.


The data are given as part of the data archive on the Journal of Statistics Education website and can be found on the page http://www.amstat.org/publications/jse/jse_data_archive.htm.


Hanley and Hapiro, "Sexual Activity and the Lifespan of Male Fruitflies: A Dataset That Gets Attention," Journal of Statistics Education v.2, n.1, (1994), http://www.amstat.org/publications/jse/v2n1/datasets.hanley.html


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

Title Authored on Content type
R Dataset / Package psych / bfi March 9, 2018 - 1:06 PM Dataset
OpenIntro Statistics Dataset - scotus_healthcare August 9, 2020 - 2:38 PM Dataset
R Dataset / Package psych / withinBetween March 9, 2018 - 1:06 PM Dataset
R Dataset / Package Stat2Data / Kids198 March 9, 2018 - 1:06 PM Dataset
R Dataset / Package Ecdat / Wages1 March 9, 2018 - 1:06 PM Dataset
Attachment Size
dataset-11546.csv 3.52 KB
Dataset License
GNU General Public License v2.0
Documentation License
GNU General Public License v2.0