Commit 12227561 authored by patrick.lambert's avatar patrick.lambert
Browse files

nouvelle essai

parent 450b9397
...@@ -5,18 +5,25 @@ date: "`r format(Sys.time(), '%d %B %Y')`" ...@@ -5,18 +5,25 @@ date: "`r format(Sys.time(), '%d %B %Y')`"
bibliography: biblio.bib bibliography: biblio.bib
csl: ecological-modelling.csl csl: ecological-modelling.csl
output: output:
word_document: bookdown::word_document2:
df_print: kable df_print: kable
reference_docx: ref_doc.docx reference_docx: ref_doc.dotx
toc: yes # toc: yes
fig_caption: yes # fig_caption: yes
plots:
style: Normal
align: center
caption:
style: Image Caption
pre: 'Figure '
sep: ': '
# do: default # do: default
editor_options: editor_options:
chunk_output_type: console chunk_output_type: console
--- ---
```{r setup, include=FALSE} ```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, include = FALSE, fig.alig ='left') knitr::opts_chunk$set(echo = TRUE, include = FALSE, fig.alig = 'left')
``` ```
```{r library} ```{r library}
...@@ -25,6 +32,8 @@ library(tidyr) ...@@ -25,6 +32,8 @@ library(tidyr)
library(ggplot2) library(ggplot2)
library(knitr) library(knitr)
library(flextable) library(flextable)
library(bookdown)
library(stringr)
``` ```
```{r load data} ```{r load data}
...@@ -48,7 +57,7 @@ distanceNEA <- distanceNEA %>% ...@@ -48,7 +57,7 @@ distanceNEA <- distanceNEA %>%
replace(., col(.) == row(.), NA) %>% replace(., col(.) == row(.), NA) %>%
as.data.frame() %>% mutate(destination = str_replace_all(row.names(.), "([ '\\-\\.])", "_")) %>% as.data.frame() %>% mutate(destination = str_replace_all(row.names(.), "([ '\\-\\.])", "_")) %>%
pivot_longer(cols = -destination, names_to = 'departure', values_to = 'distance') %>% pivot_longer(cols = -destination, names_to = 'departure', values_to = 'distance') %>%
mutate(departure = str_replace_all(departure, "([ '\\-\\.])", "_")) %>% mutate(departure = str_replace_all(departure, "([ '\\-\\.])", "_")) %>%
dplyr::select(departure, destination, distance) %>% dplyr::select(departure, destination, distance) %>%
arrange(departure, distance) arrange(departure, distance)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment