class: title-slide, middle .bold[Wu Gong] Biostatistician Department of Biostatistics Vanderbilt Univeristy Medical Center --- # Set up ```r ## knitr::opts_chunk$set( ## fig.showtext = TRUE, ## fig.width = 16, ## fig.height = 8, ## dpi = 300 ## ) ## devtools::install_github("yihui/xaringan") ## devtools::install_github("gadenbuie/xaringanthemer@dev") library(xaringanthemer) library(Wu) ``` ``` ## Loading required package: data.table ``` ``` ## Loading required package: plyr ``` ``` ## Loading required package: dplyr ``` ``` ## ## Attaching package: 'dplyr' ``` ``` ## The following objects are masked from 'package:plyr': ## ## arrange, count, desc, failwith, id, mutate, rename, summarise, ## summarize ``` ``` ## The following objects are masked from 'package:data.table': ## ## between, first, last ``` ``` ## The following objects are masked from 'package:stats': ## ## filter, lag ``` ``` ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union ``` ``` ## Loading required package: lubridate ``` ``` ## ## Attaching package: 'lubridate' ``` ``` ## The following objects are masked from 'package:data.table': ## ## hour, isoweek, mday, minute, month, quarter, second, wday, week, ## yday, year ``` ``` ## The following objects are masked from 'package:base': ## ## date, intersect, setdiff, union ``` ``` ## Loading required package: magrittr ``` ``` ## Loading required package: tableone ``` ``` ## Loading required package: DT ``` ``` ## Loading required package: ggplot2 ``` ``` ## Loading required package: gridExtra ``` ``` ## ## Attaching package: 'gridExtra' ``` ``` ## The following object is masked from 'package:dplyr': ## ## combine ``` ``` ## Loading required package: plotly ``` ``` ## ## Attaching package: 'plotly' ``` ``` ## The following object is masked from 'package:ggplot2': ## ## last_plot ``` ``` ## The following objects are masked from 'package:plyr': ## ## arrange, mutate, rename, summarise ``` ``` ## The following object is masked from 'package:stats': ## ## filter ``` ``` ## The following object is masked from 'package:graphics': ## ## layout ``` ``` ## Loading required package: knitr ``` ``` ## Loading required package: kableExtra ``` ``` ## ## Attaching package: 'kableExtra' ``` ``` ## The following object is masked from 'package:dplyr': ## ## group_rows ``` ``` ## Loading required package: labelled ``` ``` ## Loading required package: nnet ``` ``` ## Loading required package: scales ``` ``` ## Loading required package: png ``` ``` ## Loading required package: mgcv ``` ``` ## Loading required package: nlme ``` ``` ## ## Attaching package: 'nlme' ``` ``` ## The following object is masked from 'package:dplyr': ## ## collapse ``` ``` ## This is mgcv 1.8-33. For overview type 'help("mgcv-package")'. ``` ``` ## ## Attaching package: 'mgcv' ``` ``` ## The following object is masked from 'package:nnet': ## ## multinom ``` ``` ## Loading required package: lme4 ``` ``` ## Loading required package: Matrix ``` ``` ## ## Attaching package: 'lme4' ``` ``` ## The following object is masked from 'package:nlme': ## ## lmList ``` ``` ## Loading required package: flexdashboard ``` ``` ## ## Attaching package: 'Wu' ``` ``` ## The following object is masked from 'package:scales': ## ## percent ``` ``` ## The following object is masked from 'package:stats': ## ## heatmap ``` ```r style_duo_accent( primary_color = "#1b9aaa", secondary_color = "#ffc43d", text_font_google = google_font("Coming Soon"), #<< this is crazy but okay header_font_google = google_font("Trade Winds") #<< very on brand for Tampa ) ``` --- # Plotly Heatmap
--- # Plotly Histogram
--- .blue[Bullets] `$$\bar{X}=\frac{1}{n}\sum_{i=1}^nX_i$$` * Item I * Item II - Point A - Point B * Item III --- # Regression ```r # a boring regression fit = lm(dist ~ 1 + speed, data = cars) coef(summary(fit)) ``` ``` ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) -17.579095 6.7584402 -2.601058 1.231882e-02 ## speed 3.932409 0.4155128 9.463990 1.489836e-12 ``` --- # Table ```r knitr::kable(head(iris), format = 'html') ``` <table> <thead> <tr> <th style="text-align:right;"> Sepal.Length </th> <th style="text-align:right;"> Sepal.Width </th> <th style="text-align:right;"> Petal.Length </th> <th style="text-align:right;"> Petal.Width </th> <th style="text-align:left;"> Species </th> </tr> </thead> <tbody> <tr> <td style="text-align:right;"> 5.1 </td> <td style="text-align:right;"> 3.5 </td> <td style="text-align:right;"> 1.4 </td> <td style="text-align:right;"> 0.2 </td> <td style="text-align:left;"> setosa </td> </tr> <tr> <td style="text-align:right;"> 4.9 </td> <td style="text-align:right;"> 3.0 </td> <td style="text-align:right;"> 1.4 </td> <td style="text-align:right;"> 0.2 </td> <td style="text-align:left;"> setosa </td> </tr> <tr> <td style="text-align:right;"> 4.7 </td> <td style="text-align:right;"> 3.2 </td> <td style="text-align:right;"> 1.3 </td> <td style="text-align:right;"> 0.2 </td> <td style="text-align:left;"> setosa </td> </tr> <tr> <td style="text-align:right;"> 4.6 </td> <td style="text-align:right;"> 3.1 </td> <td style="text-align:right;"> 1.5 </td> <td style="text-align:right;"> 0.2 </td> <td style="text-align:left;"> setosa </td> </tr> <tr> <td style="text-align:right;"> 5.0 </td> <td style="text-align:right;"> 3.6 </td> <td style="text-align:right;"> 1.4 </td> <td style="text-align:right;"> 0.2 </td> <td style="text-align:left;"> setosa </td> </tr> <tr> <td style="text-align:right;"> 5.4 </td> <td style="text-align:right;"> 3.9 </td> <td style="text-align:right;"> 1.7 </td> <td style="text-align:right;"> 0.4 </td> <td style="text-align:left;"> setosa </td> </tr> </tbody> </table> --- # data.table
--- # htmltools::tags$iframe