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
| "000" | |
| "00O" | |
| "0O0" | |
| "0OO" | |
| "O0O" | |
| "OO0" | |
| "OOO" | |
| series_length <- 42 |
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(patchwork) | |
| library(glue) | |
| tib <- | |
| tribble(~sector, ~poor_overall, ~population_portion, ~poor_percent, | |
| "secular", 0.27, 0.66, 0.086, | |
| "ultra-orthodox", 0.26, 0.11, 0.52, | |
| "arab", 0.454, 0.2, 0.47, | |
| "others", 0.016, 0.03, 0.113) %>% |
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(shinydashboard) | |
| # Define UI for application that draws a histogram | |
| ui <- dashboardPage(title = "Simple dashboard", | |
| header = dashboardHeader(), | |
| sidebar = dashboardSidebar(), | |
| dashboardBody(actionButton("open_modal", "Open modal"), | |
| textOutput("chosen_fruit")) | |
| ) |
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) | |
| wind_turbine <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-10-27/wind-turbine.csv') | |
| p1 <- ggplot(wind_turbine, aes(x = rotor_diameter_m, y = turbine_rated_capacity_k_w)) + | |
| geom_point() + | |
| stat_smooth(method = "lm") + | |
| ggtitle("Capacity vs rotor diameter") + | |
| ylab("Capacity [kW]") + | |
| xlab("Rotor diameter [m]") |
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
| watch_levels <- tribble(~time, ~battery, ~status, | |
| "2020-08-19 18:27", 0.94, "actual", | |
| "2020-08-19 18:27", 0.94, "predicted", | |
| "2020-08-19 22:42", 0.57, "actual", | |
| "2020-08-20 06:42", 0, "actual") %>% | |
| mutate(time = as.POSIXct(time)) %>% | |
| bind_rows(tibble(time = as.POSIXct("2020-08-19 18:27") + (24+5)*60*60 + 120, | |
| battery = 0, | |
| status = "predicted")) %>% | |
| mutate(status = case_when(status == "actual" ~ "What actually happened", |
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
| example1 <- tribble(~x, ~y, ~x_end, ~y_end, | |
| 0, 0, 1, 1, | |
| 1.5, 1, 2, 2, | |
| 3, 5, 4, 2) | |
| example_pointed <- example1 %>% select(x,y) %>% | |
| bind_rows(example1 %>% select(x_end, y_end) %>% set_names(c("x", "y"))) | |
| ggplot(example1, aes(x = x, y = y)) + | |
| geom_segment(aes(x = x, y = y, xend = x_end, yend = y_end), lineend = "round") + |
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
| /******************************************************************************* | |
| * bootstrap-rtl (version 3.3.4) | |
| * Author: Morteza Ansarinia (http://github.com/morteza) | |
| * Created on: August 13,2015 | |
| * Project: bootstrap-rtl | |
| * Copyright: Unlicensed Public Domain | |
| *******************************************************************************/ | |
| /* | |
| Work to allow handsontable to go from right to left |
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) | |
| example1 <- tibble(size = c("A", "A", "C", "C", "B", "B"), | |
| re_order_var = c(1,1,2,2,3,3)) | |
| # works as expected: | |
| example1 %>% | |
| arrange(re_order_var) %>% | |
| mutate(size = fct_inorder(size)) %>% | |
| ggplot(aes(size, y = 1)) + |
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
| tibble(plnorm = 0.8*plnorm(q = seq(0, 20, by = 0.1), meanlog = 1.621, sdlog = 0.418), | |
| q = seq(0, 20, by = 0.1)) %>% | |
| ggplot(aes(x = q, y = plnorm)) + | |
| geom_point() + | |
| coord_cartesian(ylim = c(0,1)) | |
| # https://www.eurosurveillance.org/content/10.2807/1560-7917.ES.2020.25.10.2000180#html_fulltext | |
| # https://www.acpjournals.org/doi/10.7326/M20-0504 |
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(ggplot2) | |
| ggplot() + | |
| ggtitle(label = "הסימן הזה הפוך!", | |
| subtitle = "\u202bאבל דווקא זה בסדר!") + | |
| theme(plot.title = ggplot2::element_text(hjust = 1), | |
| plot.subtitle = ggplot2::element_text(hjust = 1)) |
NewerOlder