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) | |
ui <- fluidPage( | |
actionButton("debug", "DEBUG") | |
) | |
server <- function(input, output, session) { | |
inputs <- reactiveValues(a = 1) | |
new_inputs <- inputs |
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
split_tables <- function(data, cols_to_freeze, max_col = 7) { | |
stopifnot( | |
"columns to fix do not exist in data" = | |
all(cols_to_freeze %in% names(data)) | |
) | |
# we don't need to table wrap if the data is less than max_col | |
if (ncol(data) <= max_col) { | |
return(data) |
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(dplyr) | |
library(rlang) | |
library(purrr) | |
library(learnr) | |
# TODO step 1 - turn the input DF into this list | |
# Input | |
quiz_list <- list( |
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) | |
ui <- fluidPage( | |
uiOutput("all_the_tables"), | |
downloadButton("download", "DOWNLOAD_ALL") | |
) | |
# Define server logic required to draw a histogram | |
server <- function(input, output) { | |
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
```{ojs} | |
maya_utils = require('maya_utils') | |
``` | |
```{ojs} | |
myNums = [1,2,3,1,4,1,2,5,3,4] | |
``` | |
```{ojs} | |
uniqueNums = maya_utils.removeArrayDuplicates(myNums) |
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) | |
file_structure <- list( | |
LEVEL_1 = list( | |
LEVEL_2a = list( | |
LEVEL_3a1 = list( | |
LEVEL_4a1 = list() | |
), | |
LEVEL_3a2 = list( | |
LEVEL_4a3 = list() |
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) | |
# note that the cells we want to toggle have a class called changes-color | |
df1 <- data.frame( | |
a = c( | |
"<div class='changes-color'>A</div>", | |
"<div>B</div>", | |
"<div class='changes-color'>C</div>" | |
) | |
) |
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) | |
# note that the cells we want to toggle have a class called changes-color | |
df <- data.frame( | |
a = c( | |
"<div class='changes-color'>A</div>", | |
"<div>B</div>", | |
"<div class='changes-color'>C</div>" | |
) | |
) |
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(DT) | |
data <- data.frame( | |
a = 1:3, | |
b = 2:4, | |
c = 5:7 | |
) | |
table <- DT::datatable( |
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
// https://d3js.org v7.0.3 Copyright 2010-2021 Mike Bostock | |
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,(function(t){"use strict";function n(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function e(t){let e=t,r=t,i=t;function o(t,n,e=0,o=t.length){if(e<o){if(0!==r(n,n))return o;do{const r=e+o>>>1;i(t[r],n)<0?e=r+1:o=r}while(e<o)}return e}return 1===t.length&&(e=(n,e)=>t(n)-e,r=n,i=(e,r)=>n(t(e),r)),{left:o,center:function(t,n,r=0,i=t.length){const a=o(t,n,r,i-1);return a>r&&e(t[a-1],n)>-e(t[a],n)?a-1:a},right:function(t,n,e=0,o=t.length){if(e<o){if(0!==r(n,n))return o;do{const r=e+o>>>1;i(t[r],n)<=0?e=r+1:o=r}while(e<o)}return e}}}function r(t){return null===t?NaN:+t}const i=e(n),o=i.right,a=i.left,u=e(r).center;var c=o;function f(t,n){let e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&++e;else{let r=-1;for(let i of t)null!=( |
NewerOlder