animals
| speed | color | |
|---|---|---|
| Elephant | 40 | Gray |
| Cheetah | 120 | Tan |
| Tortoise | 0.1 | Green |
| Hare | 48 | Grey |
| Lion | 80 | Tan |
| Polar Bear | 30 | White |
Source: http://www.speedofanimals.com
Questions:
- Extract the
speedof 40 km/h. - Return the rows with
colorof Tan. - Return the rows with
speedgreater than 50 km/h and output only thecolorcolumn. Keep the output as a data frame. - Change the color of “Grey” to “Gray”.
To work with the animals.csv file, you can right-click here and download it to the data folder.
Next, read it in using the following: ~animals <- read.csv("data/animals.csv")~
animals <- read.csv("data/animals.csv", row.names=1)