Learn R Programming

BSDA (version 1.2.0)

Dogs: Rankings of the favorite breeds of dogs

Description

Data for Exercise 2.88

Usage

Dogs

Arguments

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

References

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

Examples

Run this code
# NOT RUN {
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)) 
# }

Run the code above in your browser using DataLab