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(magick) | |
input_folder <- "test/" | |
output_folder <- "resized/" | |
if (!dir.exists(output_folder)) { | |
dir.create(output_folder) | |
} | |
image_files <- list.files(input_folder, full.names = TRUE, pattern = "\\.(jpg|jpeg|png)$") |
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(plotly) | |
library(gridlayout) | |
library(bslib) | |
ui <- grid_page( | |
layout = c("header header ", | |
"sidebar plot "), | |
row_sizes = c("100px", | |
"1fr"), |
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(charlatan) | |
set.seed(1234) | |
(z <- AddressProvider$new('nl_NL')) | |
address_list <- purrr::map(1:5, function(x) { | |
dplyr::bind_cols( | |
building = z$building_number(), | |
street = z$street_address(), |
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
all_files <- fs::dir_ls(".", recurse = TRUE) | |
files_info <- | |
dplyr::bind_cols(all_files, fs::file_size(all_files)) |
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
<!-- Code block --> | |
<pre class="sourceCode r code-with-copy" style="background-color: rgba(221,225,228,.2);"><span id="cb1-1" style="font-size: medium;"> | |
</span></code></pre> | |
<!-- Quote block --> | |
<blockquote style="margin: 20px 0 30px; padding-left: 20px; border-left: 2px solid #7494B1;"><q class="body-md-regular">There are only two hard things in computer science: cache invalidation and naming things.</q></blockquote> | |
<!-- Indent bullet list --> | |
<ul style="padding-left: 30px;"></ul> |
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
talks <- | |
tibble::tribble( | |
~ talks, | |
"{shinyslack}", | |
"{shinytest2}", | |
"A Journey to Data Science", | |
"A new way to build your Shiny app's UI", | |
"A Robust Framework for Automated Shiny App Testing", | |
"A touch of R in Robotics", | |
"Accelerating geospatial computing using Apache Arrow", |
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(ggplot2) | |
library(emoGG) | |
library(MetBrewer) | |
dat <- | |
tibble::tribble( | |
~queen, ~marriage_start, ~marriage_end, ~reason, ~marriage_age, | |
"Catherine of Aragon", 1509, 1533L, "divorced", 23L, | |
"Anne Boleyn", 1533L, 1536L, "beheaded", 32L, |
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
set.seed(123) | |
dat <- rnorm(1001) | |
a <- quantile(dat, type = 1) | |
b <- quantile(dat, type = 2) | |
quantile(dat, type = 3) | |
quantile(dat, type = 4) | |
quantile(dat, type = 5) | |
quantile(dat, type = 6) |
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(shinydashboard) | |
library(palmerpenguins) | |
library(tidyverse) | |
ui <- dashboardPage( | |
skin = "yellow", | |
dashboardHeader(title = "Example Palmer Penguins Dashboard", | |
titleWidth = 360), | |
dashboardSidebar( |
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
# Credits to this Stack Overflow post | |
# https://stackoverflow.com/questions/13445753/force-ggplot2-scatter-plot-to-be-square-shaped | |
library(ggplot2) | |
library(grid) | |
rotation <- 45 | |
p <- | |
ggplot() + |
NewerOlder