Learn R Programming

fastR (version 0.10.3)

airlineArrival: Airline On-Time Arrival Data

Description

Flights categorized by destination city, airline, and whether or not the flight was on time.

Arguments

Format

A data frame with 11000 observations on the following 3 variables.

  • Airport a factor with levels LosAngeles Phoenix SanDiego SanFrancisco Seattle

  • Result a factor with levels Delayed OnTime

  • Airline a factor with levels Alaska AmericaWest

References

These and similar data appear in many text books under the topic of Simpson's paradox.

Examples

Run this code
# NOT RUN {
row.perc(xtabs(~Airline+Result, data=airlineArrival))
for (city in levels(airlineArrival$Airport)) {
	cat(paste('\nArriving in ', city,':\n',sep=''))
	print(row.perc(xtabs(~Airline+Result, airlineArrival, 
		subset=Airport==city)))
}

# }

Run the code above in your browser using DataLab