This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(dygraphs) | |
library(quantmod) | |
library(shinydashboard) | |
sidebar <- | |
dashboardSidebar( | |
sidebarMenu( | |
menuItem( | |
"Dashboard", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "My Document" | |
output: html_document | |
params: | |
minimum: | |
label: "Minimum:" | |
value: 100 | |
input: slider | |
min: 0 | |
max: 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: intro_to_R | |
output: html_document | |
--- | |
## What is R? | |
R is a functional programming language for statistical computing. R has been widely adopted as the language of choice for statisticians and data scientists, and is used heavily in both academia and industry. | |
R is designed to be run interactively (you'll execute one line at a time) as opposed to a compiled language like C / C++ / Java. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
output: | |
html_document: | |
toc: true | |
toc_float: true | |
code_folding: hide | |
params: | |
symbol: TSLA | |
--- | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: 'Notebook: htmwlwidgets' | |
output: | |
html_notebook: default | |
html_document: default | |
--- | |
## dygraphs | |
https://github.com/rstudio/dygraphs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(sparklyr) | |
library(shiny) | |
library(leaflet) | |
library(readr) | |
library(ggplot2) | |
spark <- 0 | |
if(spark){ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Spark ML - Binary Classifier Area under ROC | |
#' | |
#' @param predicted_tbl_spark The result of running sdf_predict | |
#' @param label A character string specifying which column contains the true, indexed labels (0 / 1) | |
#' @param score A characger string specifying which column contains the scored probability of a 1 | |
#' | |
#' @return The area under the ROC curve. | |
#' @export |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
output: | |
html_notebook: null | |
html_document: null | |
--- | |
```{r setup} | |
library(ggplot2) | |
library(plotly) | |
library(dplyr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Exercise 2 - solution | |
library(shiny) | |
library(gapminder) | |
library(dplyr) | |
# Note: This code creates data sets to use in each tab. | |
# It removes Kuwait since Kuwait distorts the gdp scale | |
all_data <- filter(gapminder, country != "Kuwait") | |
africa_data <- filter(gapminder, continent == "Africa") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(ggplot2) | |
library(htmltools) | |
ui <- fluidPage( | |
h2("insertUI demo"), | |
sidebarLayout( | |
sidebarPanel( | |
selectInput("dataset", "Pick Dataset", choices = c("mtcars", "iris"), selected = "iris"), | |
# This will hold column dropdowns and "Add plot" button |
OlderNewer