Skip to content

Instantly share code, notes, and snippets.

View riinuots's full-sized avatar
🤓
nerding out on Shiny modules

Riinu Pius riinuots

🤓
nerding out on Shiny modules
View GitHub Profile
library(tidyverse)
one = tibble(x = c(2, 4, 3, 2.75, 2.75, 3.25, 3.25),
y = c(1, 1, 6, 0, 1, 1, 0),
group = c(rep("#005a32", 3), rep("#543005", 4)))
two = tribble(~x, ~y,
2.7, 2,
3, 3,
3.4, 1.6,
3.5, 2.5,
library(tidyverse)
one = tibble(x = c(2, 4, 3, 2.75, 2.75, 3.25, 3.25),
y = c(1, 1, 6, 0, 1, 1, 0),
group = c(rep("#005a32", 3), rep("#543005", 4)))
two = tribble(~x, ~y,
2.7, 2,
3, 3,
3.4, 1.6,
3.5, 2.5,
# Part 1/3 of #HealthyR #rstats Season's Greetings
library(tidyverse)
one = tibble(x = c(2, 4, 3, 2.75, 2.75, 3.25, 3.25),
y = c(1, 1, 6, 0, 1, 1, 0),
group = c(rep("#005a32", 3), rep("#543005", 4)))
ggplot(one, aes(x, y, fill = group)) +
geom_polygon()
library(tidyverse)
library(palmerpenguins)
penguins %>%
ggplot(aes(species, flipper_length_mm, fill = sex, size = body_mass_g)) +
geom_jitter(shape = 21, colour = "grey", alpha = 0.8) +
scale_fill_viridis_d() +
theme_bw()
---
title: "Reticulate example"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(
echo = TRUE,
message = FALSE,
warning = FALSE
@riinuots
riinuots / split_corehr_pdf.R
Last active July 31, 2020 07:43
Split up the single huge PDF with all applicants from the corehr system
# R script to split up the recruitment PDF that we get from HR
# Riinu Pius 30/07/2020
# Script figures out where each new application starts, extracts the candidates last name
# then creates a separate PDF for each candidate: Lastname.pdf
library(tidyverse)
library(pdftools)
pdf_filename = "Candidate report (n) Job Title vacancy 123456.pdf"
# Change to "\" if on Windows:
---
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r message=FALSE, warning=FALSE}
library(tidyverse)
@riinuots
riinuots / tex_placement_options.yml
Created February 7, 2020 22:36
Markdown YAML: pass placement options [!hb]
---
header-includes:
- \usepackage{float}
- \floatplacement{table}{!hb}
- \floatplacement{figure}{!hb}
---
library(tidyverse)
library(rnaturalearth)
library(sf)
theme_set(theme_void())
world_map = ne_countries(scale = "medium", returnclass = "sf") %>%
st_transform(crs = "+proj=moll") %>%
filter(sovereignt != "Antarctica")
healthyr_iso= c("GB", "EE", "GH")
library(shiny)
library(tidyverse)
library(gapminder)
# User Interface
ui <- basicPage(
plotOutput(outputId = "myplot")
)