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 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 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 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 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 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 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 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.3
NewerOlder