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(microbenchmark) | |
library(data.table) | |
library(readr) | |
library(vroom) | |
library(iotools) | |
myfile <- 'mypath.csv' | |
microbenchmark(read.csv(myfile), | |
data.table::fread(myfile), |
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(callr) | |
ui <- fluidPage( | |
titlePanel('Using callR in Shiny'), | |
actionButton('start_job', 'Start Expensive Job'), | |
tableOutput('result_table') | |
) |
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
# Load libraries | |
library(prophet) | |
library(RCurl) | |
library(ggplot2) | |
# Get the data | |
url <-'https://raw.github.com/facebook/prophet/master/examples/example_retail_sales.csv' | |
df <- read.csv(url) |
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( | |
shinyjs::useShinyjs(), | |
# event handler in JavaScript: handles requests from R | |
# tells JavaScript to call the function and to pass it a message that it got from R | |
tags$head( | |
tags$script(" |
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( | |
shinyjs::useShinyjs(), | |
# event handler in JavaScript: handles requests from R | |
# tells JavaScript to call the function and to pass it a message that it got from R | |
tags$head( | |
tags$script(" |
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(magrittr) | |
counts <- | |
reactiveValues(baseline = 0, | |
debounce = 0, | |
throttle = 0) | |
ui <- fluidPage( | |
titlePanel("Slowing down a chatty reactive expression 💬🦥 - demo"), |
We can't make this file beautiful and searchable because it's too large.
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
Primary Care Organisation;Brand;Company;Product;Dosage;Active Ingredients;BNF Chapter;BNF Section;BNF Sub Paragraph;Country;BNF Paragraph;Strength;Prescription Type;Units;Value | |
NHS Kent and Medway CCG;Generic;Generic;Pregabalin Capsule;Capsule;Pregabalin;Central Nervous System;Antiepileptic drugs;Control of epilepsy;England;Control of epilepsy;Pregabalin 50mg capsules;INN;230030;9694,96 | |
NHS Kent and Medway CCG;Generic;Generic;Pregabalin Capsule;Capsule;Pregabalin;Central Nervous System;Antiepileptic drugs;Control of epilepsy;England;Control of epilepsy;Pregabalin 100mg capsules;INN;208665;10211,47 | |
NHS North West London CCG;Generic;Generic;Pregabalin Capsule;Capsule;Pregabalin;Central Nervous System;Antiepileptic drugs;Control of epilepsy;England;Control of epilepsy;Pregabalin 75mg capsules;INN;203217;11322,05 | |
Greater Glasgow and Clyde;Generic;Generic;Pregabalin Capsule;Capsule;Pregabalin;Central Nervous System;Antiepileptic drugs;Control of epilepsy;Scotland;Control of epilepsy;Pregabalin 300mg capsules;INN;1 |
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
# libraries | |
library(gt) # version 0.5.0 | |
library(dplyr) | |
library(palmerpenguins) | |
# Create a gt table | |
penguins %>% | |
filter(sex == 'female') %>% | |
select(-year) %>% |
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
# libraries | |
library(reactable) # version 0.2.3.9000 | |
library(data.table) | |
library(shiny) | |
# Read in the data | |
# Data contains prescribing quantities for Aciclovir (limited range) and Pregabalin in February 2022 | |
# in England, Scotland, Northern Ireland and Wales | |
# Made available under the Open Government License, retrieved from Pharmly Cloud Data by Analytic Health |
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
# install histoslider | |
# remotes::install_github("cpsievert/histoslider") | |
# load libraries | |
library(shiny) | |
library(histoslider) | |
library(data.table) | |
library(quantmod) # to get current exchange rates | |
# load airbnb dataset containing properties in London |
OlderNewer