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

Thursday, September 5, 2019

Codecademy Joining Tables in R Inner Join I 3/11


#Sample Solution
---
title: "Joining Tables in R"
output: html_notebook
---

```{r message = FALSE}
# load packages
library(readr)
library(dplyr)
```

```{r message = FALSE}
# load sales and targets data
sales <- read_csv("sales.csv")
targets <- read_csv("targets.csv")
```

```{r}
# inspect orders, customers and products
head(sales)
head(targets)
```

```{r}
# define sales_vs_targets here:
sales_vs_targets <- sales %>% inner_join(targets)
sales_vs_targets
```

```{r}
# define crushing_it here:
crushing_it <- sales_vs_targets %>% filter(revenue > target)
crushing_it
```

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts