---
title: "Class 11"
author: "Andres Aravena, PhD"
date: "15 November 2016"
output: 
  html_document: 
    self_contained: no
---

# Analizing data from US states
In our system we have some varables describing US states. They are:

+ state.abb
+ state.area
+ state.center
+ state.division
+ state.name
+ state.region
+ state.x77

We want to give good descriptions of this data.

## Area versus Region
Initially we can make this simpe graphic

```{r}
plot(state.area, col=as.numeric(state.region))
```

We want to add

+ main title
+ labels on the axis
+ change numbers on the vertical axis
+ include a *legend* explaining the symbols

Here we put a main title
```{r}
plot(state.area, col=as.numeric(state.region), main="Area vs Region")
```

then we add labels to the axis
```{r}
plot(state.area, col=as.numeric(state.region), main="Area vs Region", ylab="area [sq mi]", xlab="US state")
```

then we changed the units of the vector
```{r}
plot(state.area/1000, col=as.numeric(state.region), main="Area vs Region", ylab="area [thousands sq mi]", xlab="US state")
```
