Description Usage Format References Examples
Surface area (\texttt{km}^2) for seventeen autonomous Spanish communities.
1 |
A data frame with 17 observations on the following 2 variables:
community
(a factor with levels Andalucia
, Aragon
,Asturias
, Baleares
, C.Valenciana
, Canarias
, Cantabria
, Castilla-La Mancha
, Castilla-Leon
, Cataluna
, Extremadura
, Galicia
, La Rioja
, Madrid
, Murcia
, Navarre
, and P.Vasco
)
surface
(surface area in \texttt{km}^2)
Ugarte, M. D., Militino, A. F., and Arnholt, A. T. 2015. Probability and Statistics with R, Second Edition. Chapman & Hall / CRC.
1 2 3 4 5 6 7 8 | # Base Graphs
with(data = SURFACESPAIN, barplot(surface, names.arg = community, las = 2))
# ggplot2
ggplot(data = SURFACESPAIN, aes(x = reorder(community, surface), y = surface)) +
geom_bar(stat = "identity", fill = "yellow", color = "gold") + coord_flip() +
labs(x = "", y = "squared kilometers")
# Trellis Approach
barchart(community ~ surface, data = SURFACESPAIN)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.