Create an Analytics Report Directly from R
Create a Great Report with R Markdown
The Center for Customer Insights and Digital Marketing presents a workshop on how to create a great report directly from R using the R Markdown package featuring Matheus Cordeiro, the junior data scientist. In this video, he provides live tutorials on what R markdown exactly is, what the benefits of using R markdown are, creating and comparing various types of reports (i.e., HTML, PDF, Word), and other important details that will allow you to create a successful report with R Markdown.
If you haven’t installed R or R Studio yet, click here to learn how!
Learning Outcomes
- Describe the R Markdown Structure
- Explain capabilities and benefits of using R markdown
- Compare and contrast creating PDF and HTML reports
- Create output header appropriate for desired output file type
- Explain R Markdown code structure
- Create a report in desired file format (i.e., HTML, PDF, and Word) using R Markdown
Check below to view the video!
Relevant Links and Code:
install.packages('tinytex')
tinytex::install_tinytex()
install.packages()
df_corr <- round(cor(mtcars),2)
library(reshape)
melted_corr <- melt(df_corr)
library(ggplot2)
ggplot(data = melted_corr, aes(x=X1, y=X2, fill=value)) +
geom_tile(color = "white")+
scale_fill_gradient2(low = "blue", high = "red", mid = "white",
midpoint = 0, limit = c(-1,1), space = "Lab",
name="Correlation Scale") +
geom_text(aes(X1, X2, label = value), color = "black", size = 4)
ggplot(mtcars, aes(x=wt, y=mpg)) +
geom_point() + geom_smooth(method=lm, se=FALSE)
ggplot(mtcars, aes(x=disp, y=wt)) +
geom_point() + geom_smooth(method=lm, se=FALSE)
{.tabset .tabset-dropdown}
https://rmarkdown.rstudio.com/
https://www.linkedin.com/in/matheus-cordeiro-garcia/
Supplementary Video on How to Install R and RStudio:
https://www.cpp.edu/cba/customer-insights-lab/news/event/install-r.shtml