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
| # Causallang screening process animated plot | |
| # author: Daloha Rodriguez-Molina @darokun | |
| # load packages | |
| library(tidyverse) | |
| library(gganimate) | |
| library(readxl) | |
| library(here) | |
| # data |
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
| # log_scale_exercises.R | |
| format(1*10^-4, scientific = FALSE) # starting point: 1*10^-4 = 1e-04 = 0.0001 | |
| format(1*10^-3, scientific = FALSE) # ending point: 1*10^-3 = 1e-03 = 0.001 | |
| x <- seq(0.0001:0.001, by = 0.0001, length.out = 10) # 10 datapoints ascending from 0.0001 to 0.001 | |
| format(x, scientific = FALSE) # 0.0001, 0.0002, 0.0003, [...], 0.0008, 0.0009, 0.001 | |
| format(x, scientific = TRUE) # the same, but in scientific notation: 1e-04, 2e-04, 3e-04, [...], 8e-04, 9e-04, 1e-03 | |
| plot(x, xlim = c(0, 10), ylim = c(0.0001, 0.001), pch = 20, log = "y") # plot log scale on y axis, (intervals are not equally spaced) | |
| plot(x, xlim = c(0, 10), ylim = c(0.0001, 0.001), pch = 20) # plot linear scale, (equally spaced intervals) |
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
| # install.packages("ggchicklet", repos = "https://cinc.rud.is") | |
| library(ggchicklet) | |
| library(tidyverse) | |
| x <- rep(letters[1:7], seq.int(0, 30, 5)) | |
| hb <- tibble(x) | |
| hex_codes1 <- scales::hue_pal()(length(unique(hb$x))) | |
| p1 <- ggplot(count(hb, x), aes(x = x, y = n)) + | |
| geom_chicklet(radius = grid::unit(2, 'mm'), fill = hex_codes1, colour = "black") + |
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
| # PLASMID - abbreviations script | |
| # install.packages("tidyverse") # run only if not previously installed | |
| # install.packages("googlesheets4") # run only if not previously installed | |
| library(tidyverse) | |
| library(googlesheets4) | |
| gs4_deauth() # deactivate authorization mode so it doesn't ask for google sign-in. Useful when only reading data | |
| # read data | |
| abb <- read_sheet("https://docs.google.com/spreadsheets/d/1ePlZC0FmFuqiq0B59wtNu4RCDEgypn_ucyBzFb8oK0g/edit#gid=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
| library(tidyverse) | |
| library(here) | |
| papers_filenames <- list.files(path = here::here("Library"), | |
| pattern = "(201[8-9]|2020)", | |
| full.names = TRUE) | |
| file.copy(from = papers_filenames, to = here::here("Library", "subset")) |
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(leaflet) | |
| library(googlesheets4) | |
| dat <- read_sheet("1q5Qo6j0fxpjJ9LtKXxkTya7-3YMTXh059c6rqonQP1A") %>% | |
| filter(!is.na(pic)) | |
| icons <- awesomeIcons( | |
| icon = "star", | |
| iconColor = "white", |
OlderNewer