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

Wednesday, September 4, 2019

Codecademy Learn R Arranging Rows 11/12


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

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

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

```{r}
# arrange rows in ascending order
group_asc <- artists %>% arrange(group)
group_asc
```

```{r}
# arrange rows in descending order
youtube_desc <- artists %>% arrange(desc(youtube_subscribers))
youtube_desc
```

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts