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(RSelenium) | |
# Google play store page for twitter app | |
url <- "https://play.google.com/store/apps/details?id=com.twitter.android" | |
# RSelenium firefox browser setup | |
driver <- rsDriver(browser = 'firefox', verbose = FALSE, port = 123L) | |
session <- driver$client | |
session$open() |
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 |
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(tidyverse) | |
library(lubridate) | |
df <- tibble( | |
dist1 = sort(rnorm(100, 5, 2)), | |
dist2 = sort(rnorm(100, 8, 3)), | |
dist4 = sort(rnorm(100, 15, 1)), | |
date = seq.Date(from = ymd("2022-01-01"), ymd("2022-04-10"), by = "day") | |
) |
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
# Print messages with print and cat | |
print("This is the message I want to print") | |
cat("This is the message I want to print\n") # Using the \n operator to jump for the next line | |
# The print command can also print code output | |
print(data.frame(x = 1:3, y = 4:6)) | |
# Where cat cannot print non text or multiple vector objects | |
cat(data.frame(x = 1:3, y = 4:6)) | |
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
# | |
# Bookmarking | |
# Annotations & Commenting | |
# Gitlink | |
# | |
library(shiny) | |
library(gitlink) | |
# Define UI for application that draws a histogram |
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
# Make a README badge for your R Shiny repo | |
# Matt Dray, March 2021 | |
# {badgr} blog post: https://www.rostrum.blog/2020/05/08/readme-badge/ | |
# Shiny badge blog post: https://www.rostrum.blog/2021/03/23/shiny-badge/ | |
# {badgr} is available from GitHub via {remotes} | |
install.packages("remotes") # if not already installed | |
remotes::install_github("matt-dray/badgr") # install {badgr} |
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 basic multiple bookmark buttons example on Shiny Dev Center: | |
# https://shiny.rstudio.com/articles/bookmarking-state.html | |
# | |
library(shiny) | |
library(palmerpenguins) | |
library(ggplot2) | |
library(dplyr) |
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
--- | |
title: "Action Required: Low Inventory Alert!" | |
output: blastula::blastula_email | |
--- | |
<img src="low-inventory-banner.png"> | |
A low inventory alert has been triggered - Review the current inventory levels below to determine which filament colors need to be replenished today. | |
### Current inventory by unit color: |
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
--- | |
title: "Cookie Cutter Shop Report" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
library(blastula) | |
``` |
NewerOlder