setwd("~/projects/Github/")
packageVersion("import")
#> [1] β1.3.0.9004β
if (dir.exists("pkgs")) unlink("pkgs", recursive = TRUE)
dir.create("pkgs")
dir.create("pkgs/0.1.0")
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
| #* @assets ./public / | |
| list() | |
| n_clicked <- 0 | |
| #* @post /clicked | |
| #* @serializer html | |
| function() { | |
| n_clicked <<- n_clicked + 1 | |
| paste0("Clicked <b>", n_clicked, "</b>\n") | |
| } |
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(shiny.tailwind) | |
| # Define Helper functions for open modal btn and modal ===== | |
| #' Creates a button to open a Modal Dialog | |
| #' | |
| #' @param btn_id ID of the button | |
| #' @param btn_label Label for the button | |
| #' @param btn_class Classes to style the button |
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(sf) | |
| library(spData) | |
| library(gganimate) | |
| data(world) | |
| # see also: https://proj.org/operations/projections/index.html | |
| projs <- list( | |
| "Mercator" = "+proj=merc", |
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(tidyverse) | |
| library(glue) | |
| library(DT) | |
| df <- mtcars %>% | |
| rownames_to_column("car") %>% | |
| select(car, everything()) | |
library(sf)
#> Linking to GEOS 3.8.0, GDAL 3.1.2, PROJ 7.0.0
library(leaflet)
library(leafem)
url <- "https://raw.githubusercontent.com/bjornharrtell/flatgeobuf/3.0.1/test/data/UScounties.fgb"
map <- st_read(url)
#> Reading layer `UScounties' from data source `https://raw.githubusercontent.com/bjornharrtell/flatgeobuf/3.0.1/test/data/UScounties.fgb' using driver `FlatGeobuf'
#> Simple feature collection with 3221 features and 6 fields
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
| ``` r | |
| library(shiny) | |
| library(magrittr) # for the pipe | |
| library(shinydashboard) | |
| #> | |
| #> Attaching package: 'shinydashboard' | |
| #> The following object is masked from 'package:graphics': | |
| #> | |
| #> box |
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(shinydashboard) | |
| library(rintrojs) | |
| add_class <- function(x, class) { | |
| x$attribs <- append(x$attribs, list(class = class)) | |
| x | |
| } | |
| # # Alternatively, override the functions of shiny/shinydashboard | |
| # menuItem <- function(text, tabName, ...) { |
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(promises) | |
| library(future) | |
| plan(multiprocess) | |
| long_running_function <- function(sleep = 3) { | |
| Sys.sleep(sleep) | |
| "Finished long_running_function()" | |
| } |
library(tidymodels)
#> ββ Attaching packages βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ tidymodels 0.1.0 ββ
#> β broom 0.5.5 β recipes 0.1.9
#> β dials 0.0.4 β rsample 0.0.5
#> β dplyr 0.8.5 β tibble 2.1.3
#> β ggplot2 3.3.0 β tune 0.0.1
#> β infer 0.5.1 β workflows 0.1.1
#> β parsnip 0.0.5 β yardstick 0.0.6
#> β purrr 0.3.3NewerOlder