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
#' Extinction probablity based on IUCN status | |
#' | |
#' This function returns an extinction probability based on a IUCN Red List | |
#' status. The extinction probability it returns is based on the EDGE2 metric as | |
#' defined by Gumbs et al. (2023) <doi:10.1371/journal.pbio.3001991>. | |
#' In particular, it returns the Global Endangerment 2 score (GE2). | |
#' See their Figure 1, Supplementary Info S1 for more information and the | |
#' underlying data with data sheet S4. | |
#' | |
#' The idea is that each IUCN status is associated with a median extinction risk |
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
list(traits = structure(c(0.0672472331207246, 0.795684163691476, | |
0.997313872678205, 0.542126356624067, 0.266995168523863, 0.954949954524636, | |
0.108523507369682, 0.249139602528885, 0.588747339788824, 0.900564769050106, | |
0.0302994444500655, 0.407474847277626, 0.1075431893114, 0.733778670197353, | |
0.133502611424774, 0.103931269142777, 0.238055266439915, 0.819211864378303, | |
0.349372869357467, 0.661441418575123, 0.415594322374091, 0.894165905192494, | |
0.59261961793527, 0.74796782550402, 0.319392101606354, 0.40641696867533, | |
0.817589435493574, 0.207942749606445, 0.0987115791067481, 0.443528626346961, | |
0.24516011425294, 0.174178527202457, 0.439530419418588, 0.36717617767863, | |
0.570931863738224, 0.38591324724257, 0.89054117561318, 0.821960192639381, |
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
{ | |
"idiv-computer": { | |
"auto_append_newline": true, | |
"default_encoding": "UTF-8", | |
"doc_outline_show": "sections_and_chunks", | |
"document_author": "Matthias Grenié and Hugo Gruson", | |
"editor_theme": "Monokai", | |
"font_size_points": 12, | |
"graphics_antialiasing": "subpixel", | |
"highlight_r_function_calls": true, |
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
# remotes::install_github("ropensci/solrium") | |
library(solrium) | |
(cli <- SolrClient$new(host = "api.archives-ouvertes.fr", path = "search", | |
port = NULL)) | |
# Get all fields back | |
cli$search(params = list(q = "tomate", wt = "xml", fl="*")) |
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
--- | |
title : "How to use papaja: An Example Manuscript Including Basic Instructions" | |
shorttitle : "How to use papaja" | |
author: | |
- name : "Frederik Aust" | |
affiliation : "1" | |
corresponding : yes # Define only one corresponding author | |
address : "Department Psychology, University of Cologne, Herbert-Lewin-Str. 2, 50931 Köln, Germany" | |
email : "[email protected]" |
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
#' Plot network of package dependencies | |
#' | |
#' @param pkg package description, can be path or package name. | |
#' See \code{\link[devtools]{as.package}} for more information. | |
#' @param type which packages should be included in the network | |
#' | |
#' @details The resulting plot visualizes the network of package dependencies. | |
#' If you are trying to cut down on package dependencies look for big red | |
#' dots that represent a lot of upstream but few downstream dependencies. | |
#' @import ggplot2 |
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
--- | |
title: "Phylogeny with traits in branches and clade labels" | |
author: "Matthias Grenié" | |
date: /today | |
output: pdf_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` |
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
--- | |
title: "Prettier SFÉcologie 2018 Program" | |
author: "Matthias Grenié" | |
date: "17 octobre 2018" | |
header-includes: | |
- \usepackage{booktabs} | |
- \usepackage{longtable} | |
- \usepackage{array} | |
- \usepackage{multirow} | |
- \usepackage[table]{xcolor} |
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
--- | |
title: "Adding arrows to PCoA" | |
author: "Matthias Grenié" | |
date: "26 septembre 2018" | |
output: pdf_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` |
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
# Function to add number ontop of geom_boxplot | |
library(ggplot2) | |
library(dplyr) | |
# /!\ Need to manually change the "groups" if ks_test included | |
add_groups_and_number = function(given_plot, ks_tests) { | |
y_range = ggplot_build(given_plot)$layout$panel_params[[1]]$y.range | |
y_upper = max(y_range) | |
NewerOlder