Heat {BSDA}R Documentation

Primary heating sources of homes on indian reservations versus all households

Description

Data for Exercise 1.29

Usage

Heat

Format

A data frame/tibble with 301 observations on two variables

fuel

a factor with levels Utility gas, LP bottled gas, Electricity, Fuel oil, Wood, and Other

location

a factor with levels American Indians on reservation, All U.S. households, and American Indians not on reservations

Source

Bureau of the Census, Housing of the American Indians on Reservations, Statistical Brief 95-11, April 1995.

References

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

Examples


T1 <- xtabs(~ fuel + location, data = Heat)
T1
barplot(t(T1), beside = TRUE, legend = TRUE)

## Not run: 
library(ggplot2)
ggplot2::ggplot(data = Heat, aes(x = fuel, fill = location)) + 
           geom_bar(position = "dodge") + 
           labs(y = "percent") + 
           theme_bw() + 
           theme(axis.text.x = element_text(angle = 30, hjust = 1)) 

## End(Not run)


[Package BSDA version 1.2.0 Index]