#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