a cleaning in R

In an R-script:

1. Make a copy of the dataset. 
2. Use indexing to locate the problem in the data.
3. Overwrite the faulty value with a correct one - if you know it - or `NA` to mark that information is missing in this spot. 
4. Save the copy of the "cleaned" data in a **new** file.



---


#Selection - rows/observations

Two systems for selecting observations in `data.frame`s in R: 
By index (row number) or using a logical vector.


```r
&gt; (tD &lt;- head(toyData, 3))  
```

```
  pill