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

Poison

Number of poisonings reported to 16 poison control centers


Description

Data for Exercise 1.113

Usage

Poison

Format

A data frame/tibble with 226,361 observations on one variable

type

a factor with levels Alcohol, Cleaning agent, Cosmetics, Drugs, Insecticides, and Plants

Source

Centers for Disease Control, Atlanta, Georgia.

References

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

Examples

T1 <- xtabs(~type, data = Poison)
T1
par(mar = c(5.1 + 2, 4.1, 4.1, 2.1))
barplot(sort(T1, decreasing = TRUE), las = 2, col = rainbow(6))
par(mar = c(5.1, 4.1, 4.1, 2.1))
rm(T1)
## Not run: 
library(ggplot2)
ggplot2::ggplot(data = Poison, aes(x = type, fill = type)) + 
           geom_bar() + 
           theme_bw() + 
           theme(axis.text.x  = element_text(angle = 85, vjust = 0.5)) +
           guides(fill = FALSE)

## 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.