A quick example of how to use the plotROC package.
install.packages("plotROC")library(tidyverse)
library(plotROC)| .pull-left[ | |
| ```{r plot-label1, eval=FALSE} | |
| # code chunk here | |
| ggplot(iris) + | |
| aes(Sepal.Length, | |
| Sepal.Width, | |
| color = Species) + | |
| geom_point() | |
| ``` | |
| ] |
| --- | |
| title: "ggplot tutorial" | |
| subtitle: "with kunoichi + ninjutsu theme" | |
| author: "<br><br> Emi Tanaka" | |
| date: "<br>2018/09/16" | |
| output: | |
| xaringan::moon_reader: | |
| lib_dir: libs | |
| css: ["kunoichi", "ninjutsu"] | |
| nature: |
| library(ggplot2) | |
| directory <- "~/Desktop/dataviz/" | |
| fs::dir_create(directory) | |
| print.ggplot <- function(x, newpage = is.null(vp), vp = NULL, ...) { | |
| set_last_plot(x) | |
| if (newpage) grid::grid.newpage() | |
| # Record dependency on 'ggplot2' on the display list | |
| # (AFTER grid.newpage()) | |
| grDevices::recordGraphics( |
A quick example of how to use the plotROC package.
install.packages("plotROC")library(tidyverse)
library(plotROC)| --- | |
| title: "Presentation Ninja" | |
| subtitle: "⚔<br/>with xaringan" | |
| author: "Yihui Xie" | |
| date: "2016/12/12 (updated: `r Sys.Date()`)" | |
| output: | |
| xaringan::moon_reader: | |
| lib_dir: libs | |
| css: | |
| - default |
| --- | |
| title: "ggplot tutorial" | |
| subtitle: "with Emi Tanaka's kunoichi + ninjutsu theme" | |
| author: "<br><br>Gina Reynolds" | |
| date: "<br>2018/09/16" | |
| output: | |
| xaringan::moon_reader: | |
| chakra: libs/remark-latest.min.js | |
| lib_dir: libs | |
| css: ["kunoichi", "ninjutsu"] |
| if (!requireNamespace("gh", quietly = TRUE)) { | |
| install.packages("gh") | |
| } | |
| if (!requireNamespace("roomba", quietly = TRUE)) { | |
| library(devtools) | |
| install_github("ropenscilabs/roomba") | |
| } | |
| library(dplyr) |
| #!/usr/bin/env RScript | |
| messages <- purrr::map_chr(devtools::test(), | |
| list("results", 1, "message")) | |
| q("no", status = sum(messages != "success")) |
| # Connect Via RJDBC ------------------------------------------------------- | |
| library(RJDBC) | |
| drv <- JDBC("oracle.jdbc.OracleDriver", classPath="~/import/instantclient_12_2/ojdbc8.jar") | |
| con <- dbConnect(drv,"jdbc:oracle:thin:@server:1521:database", | |
| rstudioapi::askForSecret("Username"), | |
| rstudioapi::askForSecret("Database Password")) | |
| dbGetQuery(con,"select count(*) from schema.table") | |
| # Setup dplyr and dbplyr to work with RJDBC ------------------------------- |
| library(shiny) | |
| library(dplyr) | |
| library(rtweet) | |
| tweets <- search_tweets("#rstats", n = 5, include_rts = FALSE) | |
| # https://github.com/mkearney/rtweet/pull/305/files | |
| tweet_embed <- function(screen_name,status_id,...){ | |
| stem <- 'https://publish.twitter.com/oembed' |