Learn R Programming

SemiPar (version 1.0-4.2)

onions: Onions data

Description

The onions data frame contains 84 sets of observations from an experiment involving the production of white Spanish onions in two South Australian locations.

Usage

data(onions)

Arguments

Format

This data frame contains the following columns:

dens

areal density of plants (plants per square metre)

yield

onion yield (grammes per plant).

location

indicator of location: 0=Purnong Landing, 1=Virginia.

References

Ruppert, D., Wand, M.P. and Carroll, R.J. (2003) Semiparametric Regression Cambridge University Press. http://stat.tamu.edu/~carroll/semiregbook/

Examples

Run this code
# NOT RUN {
library(SemiPar)
data(onions)
attach(onions)
points.cols <- c("red","blue")
plot(dens,yield,col=points.cols[location+1],pch=16)
legend(100,250,c("Purnong Landing","Virginia"),col=points.cols,pch=rep(16,2))
# }

Run the code above in your browser using DataLab