class: center, middle, inverse, title-slide # Focused Line Higlighting ## 🧐
with xaringan ### Garrick Aden-Buie ### 2019-08-20 --- layout: true ## A dplyr example ```r library(dplyr) data(diamonds, package = "ggplot2") ``` <style type="text/css"> pre { max-height: 80%; overflow-y: auto; } </style> --- ```r diamonds %>% arrange(price) %>% filter(price > 300) %>% mutate(log_price = log(price)) %>% select(carat, cut, color, clarity, price, log_price) ``` --- ```r diamonds %>% * arrange(price) %>% filter(price > 300) %>% mutate(log_price = log(price)) %>% select(carat, cut, color, clarity, price, log_price) ``` --- ```r diamonds %>% arrange(price) %>% * filter(price > 300) %>% mutate(log_price = log(price)) %>% select(carat, cut, color, clarity, price, log_price) ``` --- ```r diamonds %>% arrange(price) %>% filter(price > 300) %>% * mutate(log_price = log(price)) %>% select(carat, cut, color, clarity, price, log_price) ``` --- ```r diamonds %>% arrange(price) %>% filter(price > 300) %>% mutate(log_price = log(price)) %>% * select(carat, cut, color, clarity, price, log_price) ``` --- ```r diamonds %>% arrange(price) %>% filter(price > 300) %>% mutate(log_price = log(price)) %>% select(carat, cut, color, clarity, price, log_price) ``` ``` ## # A tibble: 53,940 x 6 ## carat cut color clarity price log_price ## <dbl> <ord> <ord> <ord> <int> <dbl> ## 1 0.23 Ideal E SI2 326 5.79 ## 2 0.21 Premium E SI1 326 5.79 ## 3 0.23 Good E VS1 327 5.79 ## 4 0.290 Premium I VS2 334 5.81 ## 5 0.31 Good J SI2 335 5.81 ## 6 0.24 Very Good J VVS2 336 5.82 ## 7 0.24 Very Good I VVS1 336 5.82 ## 8 0.26 Very Good H SI1 337 5.82 ## 9 0.22 Fair E VS2 337 5.82 ## 10 0.23 Very Good H VS1 338 5.82 ## # … with 53,930 more rows ``` --- ```r diamonds %>% arrange(price) %>% * filter(price > 300) %>% mutate(log_price = log(price)) %>% * select(carat, cut, color, clarity, price, log_price) ``` ``` *## # A tibble: 53,940 x 6 *## carat cut color clarity price log_price ## <dbl> <ord> <ord> <ord> <int> <dbl> ## 1 0.23 Ideal E SI2 326 5.79 ## 2 0.21 Premium E SI1 326 5.79 ## 3 0.23 Good E VS1 327 5.79 ## 4 0.290 Premium I VS2 334 5.81 ## 5 0.31 Good J SI2 335 5.81 ## 6 0.24 Very Good J VVS2 336 5.82 ## 7 0.24 Very Good I VVS1 336 5.82 ## 8 0.26 Very Good H SI1 337 5.82 ## 9 0.22 Fair E VS2 337 5.82 ## 10 0.23 Very Good H VS1 338 5.82 ## # … with 53,930 more rows ``` --- layout: false class: center middle <img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="25%" /> ### [gadenbuie/xaringan-line-focus](https://github.com/gadenbuie/xaringan-line-focus) --- ```r sessioninfo::session_info() ``` ``` ## ─ Session info ────────────────────────────────────────────────────────── ## setting value ## version R version 3.5.3 (2019-03-11) ## os macOS Mojave 10.14.6 ## system x86_64, darwin15.6.0 ## ui X11 ## language (EN) ## collate en_US.UTF-8 ## ctype en_US.UTF-8 ## tz America/New_York ## date 2019-08-20 ## ## ─ Packages ────────────────────────────────────────────────────────────── ## package * version date lib source ## assertthat 0.2.1 2019-03-21 [1] standard (@0.2.1) ## backports 1.1.4 2019-04-10 [1] standard (@1.1.4) ## cli 1.1.0 2019-03-19 [1] standard (@1.1.0) ## crayon 1.3.4 2017-09-16 [1] CRAN (R 3.5.0) ## digest 0.6.20 2019-07-04 [1] CRAN (R 3.5.2) ## dplyr * 0.8.0.1 2019-02-15 [1] CRAN (R 3.5.2) ## evaluate 0.13 2019-02-12 [1] standard (@0.13) ## fansi 0.4.0 2018-10-05 [1] CRAN (R 3.5.0) ## glue 1.3.1 2019-03-12 [1] standard (@1.3.1) ## htmltools 0.3.6 2017-04-28 [1] CRAN (R 3.5.0) ## knitr 1.22 2019-03-08 [1] standard (@1.22) ## magrittr 1.5 2014-11-22 [1] CRAN (R 3.5.0) ## pillar 1.4.1 2019-05-28 [1] CRAN (R 3.5.2) ## pkgconfig 2.0.2 2018-08-16 [1] CRAN (R 3.5.0) ## purrr 0.3.2 2019-03-15 [1] CRAN (R 3.5.2) ## R6 2.4.0 2019-02-14 [1] CRAN (R 3.5.2) ## Rcpp 1.0.1 2019-03-17 [1] CRAN (R 3.5.2) ## rlang 0.3.4.9003 2019-05-17 [1] Github (r-lib/rlang@6a232c0) ## rmarkdown 1.12 2019-03-14 [1] CRAN (R 3.5.2) ## sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.5.0) ## stringi 1.4.3 2019-03-12 [1] standard (@1.4.3) ## stringr 1.4.0 2019-02-10 [1] CRAN (R 3.5.2) ## tibble 2.1.3 2019-06-06 [1] CRAN (R 3.5.2) ## tidyselect 0.2.5 2018-10-11 [1] CRAN (R 3.5.0) ## utf8 1.1.4 2018-05-24 [1] CRAN (R 3.5.0) ## vctrs 0.1.0.9003 2019-06-05 [1] Github (r-lib/vctrs@6177d59) ## withr 2.1.2 2018-03-15 [1] CRAN (R 3.5.0) ## xaringan 0.11 2019-07-12 [1] CRAN (R 3.5.2) ## xfun 0.8 2019-06-25 [1] CRAN (R 3.5.2) ## yaml 2.2.0 2018-07-25 [1] CRAN (R 3.5.0) ## zeallot 0.1.0 2018-01-28 [1] standard (@0.1.0) ## ## [1] /Library/Frameworks/R.framework/Versions/3.5/Resources/library ```