Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Dogs

Rankings of the favorite breeds of dogs


Description

Data for Exercise 2.88

Usage

Dogs

Format

A data frame/tibble with 20 observations on three variables

breed

a factor with levels Beagle, Boxer, Chihuahua, Chow, Dachshund, Dalmatian, Doberman, Huskie, Labrador, Pomeranian, Poodle, Retriever, Rotweiler, Schnauzer, Shepherd, Shetland, ShihTzu, Spaniel, Springer, and Yorkshire

ranking

numeric ranking

year

a factor with levels 1992, 1993, 1997, and 1998

Source

The World Almanac and Book of Facts, 2000.

References

Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.

Examples

cor(Dogs$ranking[Dogs$year == "1992"], Dogs$ranking[Dogs$year == "1993"])
cor(Dogs$ranking[Dogs$year == "1997"], Dogs$ranking[Dogs$year == "1998"])
## Not run: 
library(ggplot2)
ggplot2::ggplot(data = Dogs, aes(x = reorder(breed, ranking), y = ranking)) + 
           geom_bar(stat = "identity") + 
           facet_grid(year ~. ) + 
           theme(axis.text.x  = element_text(angle = 85, vjust = 0.5)) 

## End(Not run)

BSDA

Basic Statistics and Data Analysis

v1.2.0
GPL (>= 2)
Authors
Alan T. Arnholt [aut, cre], Ben Evans [aut]
Initial release
2017-07-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.