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
library(shiny) | |
ui <- fluidPage( | |
tabsetPanel( | |
id = "maintabs", | |
tabPanel( | |
"tab1", | |
"Current time is", | |
textOutput("time_out", inline = TRUE) | |
), |
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
# Disclaimer: I'm a noob at NSE and this implementation is just something I whipped up in 5 minutes at 3am. | |
# So if it's terrible, no judging! | |
library(shiny) | |
library(ggplot2) | |
ui <- fluidPage( | |
colourpicker::colourInput("col", "Select colour", "red"), | |
plotOutput("plot"), | |
verbatimTextOutput("code") |
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
library(shiny) | |
library(datasets) | |
Logged = FALSE; | |
PASSWORD <- data.frame(Brukernavn = "withr", Passord = "25d55ad283aa400af464c76d713c07ad") | |
# Define server logic required to summarize and view the selected dataset | |
shinyServer(function(input, output) { | |
source("www/Login.R", local = TRUE) | |
observe({ |
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
# This script uploads all the FAST files to the taxonomer server (only one file can be uploaded at a time) | |
# Assumes that you have RSelenium package installed and that you've got a simple selenium example to work | |
if (FALSE) { | |
fastq_files <- c( | |
list.files(# WHERE ARE THE FILES?, pattern = "fastq.gz$", full.names = TRUE) | |
) | |
login_password <- "" # what is my password??? | |
library(RSelenium) |
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
library(shiny) | |
library(gmailr) | |
ui <- fluidPage( | |
textInput("subj", "Subject", "Schedule change"), | |
textInput("text", "Message"), | |
actionButton("btn", "Send") | |
) | |
server <- function(input, output, session) { |
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
# Get a person's name, location, summary, # of connections, and skills & endorsements from LinkedIn | |
# URL of the LinkedIn page | |
user_url <- "https://www.linkedin.com/in/daattali" | |
# since the information isn't available without being logged in, the web | |
# scraper needs to log in. Provide your LinkedIn user/pw here (this isn't stored | |
# anywhere as you can see, it's just used to log in during the scrape session) | |
username <- "yourusername" | |
password <- "yourpassword" |
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
# See http://daattali.com/shiny/colourInput/ for more demos | |
library(shiny) | |
library(shinyjs) | |
ui <- fluidPage( | |
useShinyjs(), | |
colourInput("col", "Colour", "blue") | |
# colourInput("col", "Colour", "#ff0000", | |
# palette = "limited", showColour = "background") |
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
library(dplyr) | |
rawDataUrl <- "http://pub.data.gov.bc.ca/datasets/176284/BC_Liquor_Store_Product_Price_List.csv" | |
bcl <- read.csv(rawDataUrl, stringsAsFactors = FALSE) | |
products <- c("BEER", "REFRESHMENT BEVERAGE", "SPIRITS", "WINE") | |
bcl <- dplyr::filter(bcl, PRODUCT_CLASS_NAME %in% products) %>% | |
dplyr::select(-PRODUCT_TYPE_NAME, -PRODUCT_SKU_NO, -PRODUCT_BASE_UPC_NO, | |
-PRODUCT_LITRES_PER_CONTAINER, -PRD_CONTAINER_PER_SELL_UNIT, | |
-PRODUCT_SUB_CLASS_NAME) %>% | |
rename(Type = PRODUCT_CLASS_NAME, | |
Subtype = PRODUCT_MINOR_CLASS_NAME, |