Quotes help make search much faster. Example: "Practice Makes Perfect"

Wednesday, September 4, 2019

Codecademy Learn R Adding a Column 2/6


#Sample Solution
---
title: "Modifying Data Frames in R"
output: html_notebook
---

```{r message=FALSE, warning=FALSE}
# load libraries
library(readr)
library(dplyr)
```

```{r message=FALSE}
# load data frame
dogs <- read_csv('dogs.csv')
```

```{r}
# inspect data frame
head(dogs)
```

```{r}
# add average height column
dogs <- dogs %>% mutate(avg_height = (height_low_inches + height_high_inches)/2)
head(dogs)
```

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts