R Dataset / Package datasets / CO2

On this R-data statistics page, you will find information about the CO2 data set which pertains to Carbon Dioxide Uptake in Grass Plants. The CO2 data set is found in the datasets R package. You can load the CO2 data set in R by issuing the following command at the console data("CO2"). This will load the data into a variable called CO2. If R says the CO2 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 with the library() command. 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 CO2 R data set. The size of this file is about 2,580 bytes.

Carbon Dioxide Uptake in Grass Plants


The CO2 data frame has 84 rows and 5 columns of data from an experiment on the cold tolerance of the grass species Echinochloa crus-galli.




An object of class c("nfnGroupedData", "nfGroupedData", "groupedData", "data.frame") containing the following columns:


an ordered factor with levels Qn1 < Qn2 < Qn3 < ... < Mc1 giving a unique identifier for each plant.


a factor with levels Quebec Mississippi giving the origin of the plant


a factor with levels nonchilled chilled


a numeric vector of ambient carbon dioxide concentrations (mL/L).


a numeric vector of carbon dioxide uptake rates (umol/m^2 sec).


The CO2 uptake of six plants from Quebec and six plants from Mississippi was measured at several levels of ambient CO2 concentration. Half the plants of each type were chilled overnight before the experiment was conducted.

This dataset was originally part of package nlme, and that has methods (including for [, as.data.frame, plot and print) for its grouped-data classes.


Potvin, C., Lechowicz, M. J. and Tardif, S. (1990) “The statistical analysis of ecophysiological response curves obtained from experiments involving repeated measures”, Ecology, 71, 1389–1400.

Pinheiro, J. C. and Bates, D. M. (2000) Mixed-effects Models in S and S-PLUS, Springer.


require(stats); require(graphics)coplot(uptake ~ conc | Plant, data = CO2, show.given = FALSE, type = "b")
## fit the data for the first plant
fm1 <- nls(uptake ~ SSasymp(conc, Asym, lrc, c0),
 data = CO2, subset = Plant == "Qn1")
## fit each plant separately
fmlist <- list()
for (pp in levels(CO2$Plant)) {
fmlist[[pp]] <- nls(uptake ~ SSasymp(conc, Asym, lrc, c0),
data = CO2, subset = Plant == pp)
## check the coefficients by plant
print(sapply(fmlist, coef), digits = 3)

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

Attachments: csv, json

<iframe src="https://pmagunia.com/iframe/r-dataset-package-datasets-co2.html" width="100%" height="100%" style="border:0px"></iframe>