This file contains hidden or 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
# Day 0: Mean, Median, and Mode | |
# Selecting standard input | |
con <- file('stdin', open='r') | |
# We don't need the first input | |
data_line <- readLines(con)[[2]] | |
# splitting the data into individual string | |
split_data <- strsplit(data_line, " ") |
This file contains hidden or 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
# Prerequisites: | |
# devtools::install_github("jcheng5/rasterfaster") | |
# devtools::install_github("rstudio/leaflet@raster") | |
library(shiny) | |
library(leaflet) | |
showRaster <- function(r, defaultTiles = TRUE, colorFunc = colorBin("RdBu", c(minValue(r), maxValue(r)), 8)) { | |
if (!inherits(r, "RasterLayer")) { | |
stop("showRaster only works with raster layers") |
This file contains hidden or 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
########################################################################## | |
# THE MICRO MONGODB+PYTHON BOOK | |
# | |
# A simple adaptation to Python + summary of | |
# The Little MongoDB Book: https://github.com/karlseguin/the-little-mongodb-book | |
# | |
# javier arias losada | |
# twitter: @javier_arilos | |
# Usage suggestion: run line by line bu using pydemo project (https://github.com/pablito56/pydemo) |
This file contains hidden or 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
Type: Shiny | |
Title: Dynamic UI | |
License: MIT | |
Author: Winston Chang <[email protected]> | |
AuthorUrl: http://www.rstudio.com/ | |
Tags: dynamic-ui renderui uioutput | |
DisplayMode: Showcase | |
This file contains hidden or 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
data_sets <- c("mtcars") | |
shinyServer(function(input, output) { | |
# Drop-down selection box for which data set | |
output$choose_dataset <- renderUI({ | |
selectInput("dataset", "Data set", as.list(data_sets)) | |
}) | |
# select a car |