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
# | |
# This Shiny web application demonstrates the use of custom image files | |
# in place of icons for value boxes in Shiny Dashboard by overriding two | |
# functions: | |
# | |
# 'icon' from the shiny package and 'valueBox' from the shinydashboard package. | |
# | |
# Each function adds minimal, specific additional handling of image files. | |
# Note: A custom css file must also be included so that value boxes can | |
# display the icons. For that reason, do not expect images in place of icons to |
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
# Bootstrap tour step | |
.bsTourStep <- function(i, id, title, content, pos = "right", tab = NULL){ | |
id <- paste0("#", id) | |
x <- paste0(" {\n element: \"", id, | |
"\",\n title: \"", title, | |
"\",\n content: \"", content, | |
"\",\n placement: \"", pos, "\"") | |
if(i==1 && !is.null(tab)){ | |
x <- paste0(x, ",\n onShow: function (tour) { $(\"", tab, "\").tab('show');}\n }") | |
} else { |
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(rintrojs) | |
shinyServer(function(input, output, session) { | |
steps <- reactive(data.frame( | |
element=c("#plot1", "#select1", "#slider1"), | |
intro=c("This is a plot.", "The selectInput.", "Thw sliderInput."), | |
position=c("bottom", "bottom", "right") | |
)) | |
observeEvent(input$help, { introjs(session, options=list(steps=steps())) }) |
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
.img-local { | |
} | |
.small-box .img-local { | |
position: absolute; | |
top: auto; | |
bottom: 5px; | |
right: 5px; | |
z-index: 0; | |
font-size: 70px; |
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 <- "Devil in me" | |
composer <- "Words and music by Gin Wigmore" | |
performer <- "Gin Wigmore" | |
album <- "Gravel and Wine" | |
subtitle <- paste("From the album", album, "by", performer) | |
arranger <- "Arranged by Matthew Leonawicz" | |
copyright <- "2011 Island Records" | |
tagline <- paste(arranger, Sys.Date()) | |
# CHORDS |
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(rayshader) | |
library(magick) | |
img <- image_read("meme_plot.gif") | |
n <- 36 | |
phivec = 50 + 40 * 1/(1 + exp(seq(-2, 10, length.out = n) * 2)) | |
thetavec = -44 + 45 * 1/(1 + exp(seq(-2, 10, length.out = n) * 2)) | |
zoomvec = 0.6 + 0.25 * 1/(1 + exp(seq(-2, 10, length.out = n) * 2)) | |
focusvec = 0.55 + -0.2 * 1/(1 + exp(seq(-4, 8, length.out = n) / 2)) |
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: "Change tuning when rendering tabs" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` | |
## Hard to handle - intro |