library(purrr)
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
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
<?xml version='1.0' encoding="UTF-8"?> | |
<xsl:stylesheet | |
xmlns:u="http://uniprot.org/uniprot" | |
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' | |
version='1.0' | |
> | |
<xsl:output method="text" encoding="UTF-8" /> | |
<xsl:variable name="separator" select="'	'" /> |
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 -e 'rmarkdown::render("<file>.Rmd", "pdf_document")' |
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 adapted from http://www.masalmon.eu/2017/12/30/best9of2017/ | |
library(purrr) | |
library(webshot) #webshot::install_phantomjs() | |
library(magick) | |
library(dplyr) | |
library(glue) | |
# load all the CSV files in the data folder downloaded from https://analytics.twitter.com/user/<username>/tweets | |
my_tweets <- file.path("data", list.files("data", pattern = "^tweet_activity_metrics_")) %>% map_df(readr::read_csv) |
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
get_offsprings <- function(node_to_collapse, phylo) { | |
# todo: assert that node is scalar | |
phylo %>% | |
tidytree::as_data_frame() %>% | |
tidytree::offspring(.node = node_to_collapse) %>% | |
dplyr::pull(node) | |
} | |
get_offspring_tips <- function(phylo, node_to_collapse) { | |
# todo: assert that node is scalar |
I hereby claim:
- I am jeanmanguy on github.
- I am jeanmanguy (https://keybase.io/jeanmanguy) on keybase.
- I have a public key ASBB7PdT01pxgfLJDhwg-nDoV7ipwOOEx7r2Jimiv_ta6wo
To claim this, I am signing this object:
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(purrr) | |
library(dplyr) | |
library(tidyr) | |
library(readr) | |
PR17_BVot_T1_FE <- read_csv2( | |
file = "https://www.data.gouv.fr/fr/datasets/r/8fdb0926-ea9d-4fb4-a136-7767cd97e30b", | |
locale = locale("fr", encoding = "iso-8859-1"), | |
col_names = FALSE, | |
skip = 1 |