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:

## Load tidyverse
library(tidyverse)
## -- Attaching packages ------------------------------------------------------- tidyverse 1.2.1 --
## <U+221A> ggplot2 3.1.0     <U+221A> purrr   0.2.5
## <U+221A> tibble  1.4.2     <U+221A> dplyr   0.7.6
## <U+221A> tidyr   0.8.1     <U+221A> stringr 1.3.1
## <U+221A> readr   1.1.1     <U+221A> forcats 0.3.0
## -- Conflicts ---------------------------------------------------------- tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
# Create a tibble (a data frame)
main_data <- tibble()
# Create a temporary rds file
tmprds <- tempfile(fileext=".rds")

# Download 2018-09 data and add to main data
print("Getting 2018-09 data from repository")
## [1] "Getting 2018-09 data from repository"
download.file("https://github.com/MEF-BDA503/mef-bda503.github.io/blob/master/files/car_data_sep_18.rds?raw=true",destfile="tmprds.rds",mode="wb")
main_data <- bind_rows(main_data,readRDS("tmprds.rds"))

# Download 2016-04 data and add to main data
print("Getting 2016-04 data from repository")
## [1] "Getting 2016-04 data from repository"
download.file("https://github.com/MEF-BDA503/pj18-yildizmust/blob/master/odd_car_sales_data_jul_16.rds?raw=true",destfile="tmprds.rds",mode="wb")
main_data <- bind_rows(main_data,readRDS("tmprds.rds"))

# Download 2018-07 data and add to main data
### YOUR WORK HERE

# Download 2018-07 data and add to main data


# Save the final merged RDS file
saveRDS(main_data,file="~/car_data_aggregate.rds")

# Remove temporary file
file.remove(tmprds)
## Warning in file.remove(tmprds): dosya 'C:\Users\LENOVO\AppData\Local\Temp
## \RtmpmE6v3d\file7607649205f.rds' silinemiyor, sebep: 'No such file or
## directory'
## [1] FALSE
## THE END

Including Plots

You can also embed plots, for example:

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