R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

unique_categories_category1
unique_categories_category2
unique_categories_frame_material
sales_by_primary_category
sales_by_secondary_category
sales_by_frame_material
combinations_summary

Including Plots

You can also embed plots, for example:

## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
## `summarise()` has grouped output by 'category_1'. You can override using the
## `.groups` argument.
## # A tibble: 2 × 1
##   category_1
##   <chr>     
## 1 Mountain  
## 2 Road
## # A tibble: 9 × 1
##   category_2        
##   <chr>             
## 1 Over Mountain     
## 2 Trail             
## 3 Elite Road        
## 4 Endurance Road    
## 5 Sport             
## 6 Cross Country Race
## 7 Cyclocross        
## 8 Triathalon        
## 9 Fat Bike
## # A tibble: 2 × 1
##   frame_material
##   <chr>         
## 1 Carbon        
## 2 Aluminum
## # A tibble: 2 × 2
##   category_1    Sales
##   <chr>         <dbl>
## 1 Mountain   30579025
## 2 Road       24505235
## # A tibble: 9 × 2
##   category_2            Sales
##   <chr>                 <dbl>
## 1 Cross Country Race 15020250
## 2 Cyclocross          1562260
## 3 Elite Road         11920315
## 4 Endurance Road      7965110
## 5 Fat Bike             813420
## 6 Over Mountain       5850440
## 7 Sport               1533435
## 8 Trail               7361480
## 9 Triathalon          3057550
## # A tibble: 2 × 2
##   frame_material    Sales
##   <chr>             <dbl>
## 1 Aluminum       14078980
## 2 Carbon         41005280
## # A tibble: 9 × 5
## # Groups:   category_1 [2]
##   category_1 category_2         Aluminum   Carbon `Total Sales`
##   <chr>      <chr>                 <dbl>    <dbl>         <dbl>
## 1 Mountain   Cross Country Race  2548540 12471710      15020250
## 2 Mountain   Fat Bike             813420        0        813420
## 3 Mountain   Over Mountain             0  5850440       5850440
## 4 Mountain   Sport               1533435        0       1533435
## 5 Mountain   Trail               3543650  3817830       7361480
## 6 Road       Cyclocross                0  1562260       1562260
## 7 Road       Elite Road          4358415  7561900      11920315
## 8 Road       Endurance Road      1281520  6683590       7965110
## 9 Road       Triathalon                0  3057550       3057550

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.