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

Wednesday, September 4, 2019

Codecademy Learn R String Parsing 9/10


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

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

```{r}
# load students data frame
load("students.Rda")
```

```{r}
# view head of students
head(students)
```

```{r}
# remove % from score column
students <- students %>% mutate(score=gsub('\\%','',score))
students
```

```{r}
# change score column to numeric
students <- students %>% mutate(score = as.numeric(score))
students
```

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts