Mercurial > repos > ecology > cb_dissim
annotate cb_dissimilarity.r @ 1:ffaa9a71b2d2 draft
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
author | ecology |
---|---|
date | Wed, 04 Jan 2023 13:21:53 +0000 |
parents | 7e6cc3da1189 |
children | 8dc082da41c1 |
rev | line source |
---|---|
0
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1 # author: "Jonathan Richir" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
2 # date: "01 October 2022" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
3 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
4 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
5 #Rscript |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
6 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
7 ############################### |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
8 ## ## |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
9 ############################### |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
10 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
11 #####Packages : dplyr |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
12 # tidyr |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
13 # readr |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
14 # writexl |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
15 # stringr |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
16 # readxl |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
17 # tibble |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
18 # lubridate |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
19 # cowplot |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
20 # magrittr |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
21 # rmarkdown |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
22 library(magrittr) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
23 #####Load arguments |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
24 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
25 args <- commandArgs(trailingOnly = TRUE) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
26 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
27 #####Import data |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
28 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
29 if (length(args) < 1) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
30 stop("This tool needs at least 1 argument") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
31 }else { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
32 fiche_val <- args[1] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
33 input_data <- args[2] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
34 choice <- args[3] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
35 choice_date <- as.numeric(args[4]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
36 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
37 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
38 ############################################################# |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
39 # # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
40 # Loading and cleaning data # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
41 # # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
42 ############################################################# |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
43 # load qecb data |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
44 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
45 qecb <- read.csv2(input_data, header = TRUE, fileEncoding = "Latin1") # fileEncoding = "Latin1", cfr é in variable names |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
46 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
47 # import csv files ficheterrain |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
48 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
49 fiche <- read.csv2(fiche_val, header = TRUE, fileEncoding = "Latin1") # fileEncoding = "Latin1", cfr é in variable names |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
50 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
51 ## work on "Fiche terrain" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
52 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
53 date_fiche <- as.Date(stringr::str_sub(fiche$date.sortie, end = 10), origin = "1970-01-01") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
54 fiche <- tibble::add_column(fiche, date_fiche, .after = "date.sortie") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
55 rm(date_fiche) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
56 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
57 ## qecb vs fiche terrain |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
58 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
59 fiche_red <- dplyr::filter(fiche, fiche$ID.Fiche %in% unique(qecb[, c("id")])) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
60 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
61 id_count <- qecb %>% dplyr::group_by(id) %>% dplyr::count() |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
62 id_count <- dplyr::rename(id_count, "ID.Fiche" = "id") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
63 id_count <- data.frame(id_count) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
64 fiche_red <- dplyr::left_join(fiche_red, id_count) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
65 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
66 # rep fiche terrain information |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
67 fiche_expanded <- fiche_red[rep(row.names(fiche_red), fiche_red$n), 1:ncol(fiche_red)] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
68 fiche_expanded <- dplyr::rename(fiche_expanded, "id" = "ID.Fiche") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
69 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
70 ## merge qecb data and ficheterrain information |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
71 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
72 qecb <- dplyr::bind_cols(qecb, fiche_expanded) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
73 qecb <- dplyr::rename(qecb, "id_qecb" = "id...1") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
74 qecb <- dplyr::rename(qecb, "id_fiche" = "id...68") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
75 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
76 rm(fiche_expanded, fiche_red, id_count) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
77 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
78 qecb <- qecb %>% tidyr::separate(date_fiche, c("Year", "Month", "Day"), sep = "-", remove = FALSE) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
79 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
80 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
81 ## quadrat nb : in contrast to ivr df, quadrat number is missing for many observations in qecb df ; but from the Numero.Photo variable (boulder photo associated to field data collection), I could get back most missing quadrat numbers |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
82 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
83 quadrat <- stringr::str_extract(qecb$Numero.Photo, "Q[12345]") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
84 qecb <- tibble::add_column(qecb, quadrat, .after = "Numero.Photo") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
85 rm(quadrat) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
86 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
87 # check |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
88 quadrat_bis <- rep(NA, length = nrow(qecb)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
89 qecb <- tibble::add_column(qecb, quadrat_bis, .after = "quadrat") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
90 rm(quadrat_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
91 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
92 qecb$quadrat_bis <- ifelse(qecb$Numéro.Bloc.échantillon %in% c(1, 2) & qecb$Type.Bloc == "Bloc mobile", "Q1", qecb$quadrat_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
93 qecb$quadrat_bis <- ifelse(qecb$Numéro.Bloc.échantillon %in% c(3, 4) & qecb$Type.Bloc == "Bloc mobile", "Q2", qecb$quadrat_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
94 qecb$quadrat_bis <- ifelse(qecb$Numéro.Bloc.échantillon %in% c(5, 6) & qecb$Type.Bloc == "Bloc mobile", "Q3", qecb$quadrat_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
95 qecb$quadrat_bis <- ifelse(qecb$Numéro.Bloc.échantillon %in% c(7, 8) & qecb$Type.Bloc == "Bloc mobile", "Q4", qecb$quadrat_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
96 qecb$quadrat_bis <- ifelse(qecb$Numéro.Bloc.échantillon %in% c(9, 10) & qecb$Type.Bloc == "Bloc mobile", "Q5", qecb$quadrat_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
97 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
98 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
99 qecb$quadrat_bis <- ifelse(qecb$Numéro.Bloc.échantillon == 1 & qecb$Type.Bloc %in% c("Bloc fixé", "Roche en place"), "Q1", qecb$quadrat_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
100 qecb$quadrat_bis <- ifelse(qecb$Numéro.Bloc.échantillon == 2 & qecb$Type.Bloc %in% c("Bloc fixé", "Roche en place"), "Q2", qecb$quadrat_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
101 qecb$quadrat_bis <- ifelse(qecb$Numéro.Bloc.échantillon == 3 & qecb$Type.Bloc %in% c("Bloc fixé", "Roche en place"), "Q3", qecb$quadrat_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
102 qecb$quadrat_bis <- ifelse(qecb$Numéro.Bloc.échantillon == 4 & qecb$Type.Bloc %in% c("Bloc fixé", "Roche en place"), "Q4", qecb$quadrat_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
103 qecb$quadrat_bis <- ifelse(qecb$Numéro.Bloc.échantillon == 5 & qecb$Type.Bloc %in% c("Bloc fixé", "Roche en place"), "Q5", qecb$quadrat_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
104 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
105 ## I create two new variables for Site names, one for data analysis and one for data reporting. Only works for actual ivr df with 22 sites ! |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
106 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
107 # Name for data analysis |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
108 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
109 qecb <- tibble::add_column(qecb, Site = qecb$zone.habitat, .after = "ID.Fiche") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
110 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
111 for (x in seq_along(qecb$Site)) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
112 if (grepl(pattern = "Locmariaquer", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
113 qecb$Site[x] <- "GDMO_Locmariaquer" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
114 } else if (grepl(pattern = "Beg Lann", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
115 qecb$Site[x] <- "GDMO_BegLann" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
116 } else if (grepl(pattern = "Plateau du Four", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
117 qecb$Site[x] <- "FOUR_PlateauFour" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
118 } else if (grepl(pattern = "Grouin", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
119 qecb$Site[x] <- "EGMP_GroinCou" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
120 } else if (grepl(pattern = "Ensembert", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
121 qecb$Site[x] <- "EGMP_PasEmsembert" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
122 } else if (grepl(pattern = "Brée-les-Bains", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
123 qecb$Site[x] <- "EGMP_BreeBains" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
124 } else if (grepl(pattern = "Antiochat", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
125 qecb$Site[x] <- "EGMP_PerreAntiochat" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
126 } else if (grepl(pattern = "Chassiron", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
127 qecb$Site[x] <- "EGMP_Chassiron" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
128 } else if (grepl(pattern = "zone p", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
129 qecb$Site[x] <- "BASQ_FlotsBleusZP" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
130 } else if (grepl(pattern = "zone f", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
131 qecb$Site[x] <- "BASQ_FlotsBleusZF" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
132 } else if (grepl(pattern = "Saint-Michel", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
133 qecb$Site[x] <- "GONB_IlotStMichel" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
134 } else if (grepl(pattern = "Quéménès", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
135 qecb$Site[x] <- "FINS_Quemenes" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
136 } else if (grepl(pattern = "Goulenez", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
137 qecb$Site[x] <- "FINS_SeinGoulenez" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
138 } else if (grepl(pattern = "Kilaourou", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
139 qecb$Site[x] <- "FINS_SeinKilaourou" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
140 } else if (grepl(pattern = "Verdelet", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
141 qecb$Site[x] <- "ARMO_Verdelet" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
142 } else if (grepl(pattern = "Piégu", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
143 qecb$Site[x] <- "ARMO_Piegu" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
144 } else if (grepl(pattern = "Bilfot", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
145 qecb$Site[x] <- "ARMO_Bilfot" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
146 } else if (grepl(pattern = "Plate", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
147 qecb$Site[x] <- "ARMO_IlePlate" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
148 } else if (grepl(pattern = "Perharidy", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
149 qecb$Site[x] <- "PDMO_Perharidy" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
150 } else if (grepl(pattern = "Keraliou", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
151 qecb$Site[x] <- "BRES_Keraliou" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
152 } else if (grepl(pattern = "Mousterlin", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
153 qecb$Site[x] <- "FINS_Mousterlin" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
154 } else if (grepl(pattern = "Nicolas", qecb$Site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
155 qecb$Site[x] <- "FINS_StNicolasGlenan" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
156 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
157 if (grepl(pattern = "Roz", qecb$site[x]) == TRUE) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
158 qecb$Site[x] <- "FINS_AnseRoz" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
159 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
160 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
161 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
162 # Name for report/plot |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
163 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
164 qecb <- tibble::add_column(qecb, Site_bis = qecb$Site, .after = "Site") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
165 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
166 qecb$Site_bis <- ifelse(qecb$Site == "GDMO_Locmariaquer", "Locmariaquer", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
167 qecb$Site_bis <- ifelse(qecb$Site == "GDMO_BegLann", "Beg Lann", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
168 qecb$Site_bis <- ifelse(qecb$Site == "FOUR_PlateauFour", "Plateau du Four", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
169 qecb$Site_bis <- ifelse(qecb$Site == "EGMP_GroinCou", "Groin du Cou", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
170 qecb$Site_bis <- ifelse(qecb$Site == "EGMP_PasEmsembert", "Le Pas d'Emsembert", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
171 qecb$Site_bis <- ifelse(qecb$Site == "EGMP_BreeBains", "La Brée-les-Bains", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
172 qecb$Site_bis <- ifelse(qecb$Site == "EGMP_PerreAntiochat", "Le Perré d'Antiochat", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
173 qecb$Site_bis <- ifelse(qecb$Site == "EGMP_Chassiron", "Chassiron", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
174 qecb$Site_bis <- ifelse(qecb$Site == "BASQ_FlotsBleusZP", "Les Flots Bleus / zone pêcheurs", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
175 qecb$Site_bis <- ifelse(qecb$Site == "BASQ_FlotsBleusZF", "Les Flots Bleus / zone familles", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
176 qecb$Site_bis <- ifelse(qecb$Site == "GONB_IlotStMichel", "Îlot Saint-Michel", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
177 qecb$Site_bis <- ifelse(qecb$Site == "FINS_Quemenes", "Quéménès", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
178 qecb$Site_bis <- ifelse(qecb$Site == "FINS_SeinGoulenez", "Île de Sein - Goulenez", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
179 qecb$Site_bis <- ifelse(qecb$Site == "FINS_SeinKilaourou", "Île de Sein - Kilaourou", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
180 qecb$Site_bis <- ifelse(qecb$Site == "ARMO_Verdelet", "Îlot du Verdelet", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
181 qecb$Site_bis <- ifelse(qecb$Site == "ARMO_Piegu", "Piégu", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
182 qecb$Site_bis <- ifelse(qecb$Site == "ARMO_Bilfot", "Pointe de Bilfot", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
183 qecb$Site_bis <- ifelse(qecb$Site == "ARMO_IlePlate", "Île Plate", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
184 qecb$Site_bis <- ifelse(qecb$Site == "PDMO_Perharidy", "Perharidy", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
185 qecb$Site_bis <- ifelse(qecb$Site == "BRES_Keraliou", "Keraliou", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
186 qecb$Site_bis <- ifelse(qecb$Site == "FINS_Mousterlin", "Pointe de Mousterlin", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
187 qecb$Site_bis <- ifelse(qecb$Site == "FINS_StNicolasGlenan", "Saint-Nicolas des Glénan", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
188 qecb$Site_bis <- ifelse(qecb$Site == "FINS_AnseRoz", "Pointe de l'Anse du Roz", qecb$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
189 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
190 ## change some variables to factor |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
191 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
192 # change 'X..' variables that are indeed % to numeric; https://stackoverflow.com/questions/59410939/apply-function-to-all-variables-with-string-in-name |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
193 ix <- grep("^X..", names(qecb)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
194 qecb[ix] <- lapply(qecb[ix], as.numeric) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
195 rm(ix) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
196 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
197 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
198 ## save the final, complete qecb df_ |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
199 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
200 qecb <- qecb[, c(72:107, 1:71)] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
201 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
202 ## qecb df preparation prior qecb calculation |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
203 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
204 # Several issues to solve in the df first |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
205 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
206 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
207 qecb$Type.Bloc <- factor(qecb$Type.Bloc, levels = c("Bloc mobile", "Bloc fixé", "Roche en place")) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
208 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
209 qecb$Face <- factor(qecb$Face, levels = c("face supérieure", "face inférieure")) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
210 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
211 qecb <- dplyr::arrange(qecb, Type.Bloc, Face, Numéro.Bloc.échantillon) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
212 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
213 qecb <- tibble::add_column(qecb, site_year_month_day = paste0(qecb$Site, ".", qecb$Year, ".", qecb$Month, ".", qecb$Day), .after = "Site_bis") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
214 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
215 # save qecb as a new df_ for analysis purpose => several changes to operate to run the code and functions |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
216 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
217 qecbnew <- qecb |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
218 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
219 # df with list object nb and corresponding site_year_month_day value to solve for loop issues |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
220 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
221 df_list_loop <- data.frame("site_year_month_day" = unique(qecbnew$site_year_month_day), |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
222 "loop nb" = c(1:seq_along(unique(qecbnew$site_year_month_day)))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
223 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
224 # dplyr::filter for df that makes problem, then eventually correct in the dataframe for wrong coding; brackets (xx) for nb because will change when qecb df_ enlarged. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
225 # these listed boulder field survey error when highlighted when running the loop, that ran into an error ; it was a step by step procedure with solving one listed observation after another when issues appeared. Surely not the best way to proceed, maybe better just to skip these surveys (site + date), but in the present case I wanted to keep most of the observations, therefore I corrected them manually whenever needed. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
226 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
227 # list nb (28) - EGMP_BreeBains.2016.04.06 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
228 qecbnew$Face <- as.character(qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
229 qecbnew$Face <- ifelse(qecbnew$ID.Fiche == "BDD_IVR&QECB_La Bree_20160406_VImport.xlsx" & qecbnew$Référence.bloc == "avr16-LaBreeB9sup", "face supérieure", qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
230 qecbnew$Face <- ifelse(qecbnew$ID.Fiche == "BDD_IVR&QECB_La Bree_20160406_VImport.xlsx" & qecbnew$Référence.bloc == "avr16-LaBreeB10sup", "face supérieure", qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
231 qecbnew$Face <- as.factor(qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
232 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
233 # list nb 33 - EGMP_PerreAntiochat.2016.04.07 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
234 qecbnew$Face <- as.character(qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
235 qecbnew$Face <- ifelse(qecbnew$ID.Fiche == "BDD_IVR&QECB_PerAnt_20160407_VImport.xlsx" & qecbnew$Référence.bloc == "avr16-PerAntB9sup", "face supérieure", qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
236 qecbnew$Face <- ifelse(qecbnew$ID.Fiche == "BDD_IVR&QECB_PerAnt_20160407_VImport.xlsx" & qecbnew$Référence.bloc == "avr16-PerAntB10sup", "face supérieure", qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
237 qecbnew$Face <- as.factor(qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
238 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
239 # list nb 37 - EGMP_Chassiron.2016.03.09 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
240 qecbnew$Face <- as.character(qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
241 qecbnew$Face <- ifelse(qecbnew$ID.Fiche == "BDD_IVR&QECB_Chassiron_20160309&10_VImport.xlsx" & qecbnew$Référence.bloc == "mars16-ChassB9sup", "face supérieure", qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
242 qecbnew$Face <- ifelse(qecbnew$ID.Fiche == "BDD_IVR&QECB_Chassiron_20160309&10_VImport.xlsx" & qecbnew$Référence.bloc == "mars16-ChasB10sup", "face supérieure", qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
243 qecbnew$Face <- as.factor(qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
244 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
245 # list nb 76 - ARMO_Verdelet.2015.03.23 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
246 qecbnew$Face <- as.character(qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
247 qecbnew$Face <- ifelse(qecbnew$ID.Fiche == "BDD_IVR&QECB_Verdelet_20150323_VImport.xlsx" & qecbnew$Référence.bloc == "mar15-VerB10inf", "face inférieure", qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
248 qecbnew$Face <- as.factor(qecbnew$Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
249 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
250 # list nb 116 - "GDMO_Locmariaquer.2018.09.10" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
251 qecbnew$Type.Bloc <- as.character(qecbnew$Type.Bloc) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
252 qecbnew$Type.Bloc <- ifelse(qecbnew$ID.Fiche == "2018-09-10-GDMO-CDB-001" & qecbnew$Numero.Photo == "2018-09-10_GDMO_01_CDB-5_sup_392578.jpg", "Roche en place", qecbnew$Type.Bloc) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
253 qecbnew$Type.Bloc <- as.factor(qecbnew$Type.Bloc) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
254 qecbnew$quadrat_bis <- ifelse(qecbnew$ID.Fiche == "2018-09-10-GDMO-CDB-001" & qecbnew$Numero.Photo == "2018-09-10_GDMO_01_CDB-5_sup_392578.jpg", "Q5", qecbnew$quadrat_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
255 qecbnew <- qecbnew %>% dplyr::filter(!(ID.Fiche == "2018-09-10-GDMO-CDB-001" & Numero.Photo == "")) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
256 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
257 # Few sites to remove prior running the for loop because it was not just a encoding mistake for one data, but a globally wroing coding for the site + date survey. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
258 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
259 qecb_i <- qecbnew %>% dplyr::filter(site_year_month_day == "FINS_StNicolasGlenan.2016.04.08") # no bloc fixe ! |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
260 qecbnew <- qecbnew %>% dplyr::filter(site_year_month_day != "FINS_StNicolasGlenan.2016.04.08") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
261 qecb_i <- qecbnew %>% dplyr::filter(site_year_month_day == "GDMO_Locmariaquer.2019.09.30") # most faces of blocs mobiles do not correspond to each other; only 3 over 10 boulder have data for both face supérieure and face inférieure |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
262 qecbnew <- qecbnew %>% dplyr::filter(site_year_month_day != "GDMO_Locmariaquer.2019.09.30") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
263 rm(df_list_loop, qecb_i) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
264 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
265 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
266 # check for species with count within sub-0.1m^2-quadrat (i.e. reduced size quadrat compare to most organisms on boulder to count them, because abundant ; then some extrapolation) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
267 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
268 # first for Spirobranchus |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
269 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
270 qecbnew$Nb.Spirobranchus.lamarckii.total.ini <- qecbnew$Nb.Spirobranchus.lamarckii.total |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
271 qecbnew$Nb.Spirobranchus.lamarckii.total <- as.character(qecbnew$Nb.Spirobranchus.lamarckii.total) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
272 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
273 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
274 qecbnew_spirobranchus <- (dplyr::filter(qecbnew, Nb.Spirobranchus.lamarckii.total %in% c(NA, "NaN", "Inf", "-Inf"))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
275 qecbnew_spirobranchus[, c("Nb.Spirobranchus.lamarckii.1B", "Nb.Spirobranchus.lamarckii.2B", "Nb.Spirobranchus.lamarckii.3B", "Nb.Spirobranchus.lamarckii.4B", "Nb.Spirobranchus.lamarckii.5B")] <- sapply(qecbnew_spirobranchus[, c("Nb.Spirobranchus.lamarckii.1B", "Nb.Spirobranchus.lamarckii.2B", "Nb.Spirobranchus.lamarckii.3B", "Nb.Spirobranchus.lamarckii.4B", "Nb.Spirobranchus.lamarckii.5B")], as.character) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
276 (spirobranchus_data <- subset(qecbnew_spirobranchus, !is.na(qecbnew_spirobranchus$Nb.Spirobranchus.lamarckii.1B) || !is.na(qecbnew_spirobranchus$Nb.Spirobranchus.lamarckii.2B) || !is.na(qecbnew_spirobranchus$Nb.Spirobranchus.lamarckii.3B) || !is.na(qecbnew_spirobranchus$Nb.Spirobranchus.lamarckii.4B) || !is.na(qecbnew_spirobranchus$Nb.Spirobranchus.lamarckii.5B))[, c("site_year_month_day", "Nb.Spirobranchus.lamarckii.1B", "Nb.Spirobranchus.lamarckii.2B", "Nb.Spirobranchus.lamarckii.3B", "Nb.Spirobranchus.lamarckii.4B", "Nb.Spirobranchus.lamarckii.5B", "Nb.Spirobranchus.lamarckii.total")]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
277 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
278 quemenes <- dplyr::filter(qecbnew, Site == "FINS_Quemenes") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
279 quemenes <- dplyr::arrange(quemenes, date_fiche) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
280 # for Quemenes, issue because for sampling date "FINS_Quemenes.2015.09.30" the 5 counts of Spirobranchus were encoded in 1B instead of total !!! I noticed this issue when mining data (see below), therefore I corrected before running below script for Spirobranchus. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
281 qecbnew$Nb.Spirobranchus.lamarckii.total <- ifelse(qecbnew$site_year_month_day == "FINS_Quemenes.2015.09.30" & is.na(qecbnew$Nb.Spirobranchus.lamarckii.total), qecbnew$Nb.Spirobranchus.lamarckii.1B, qecbnew$Nb.Spirobranchus.lamarckii.total) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
282 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
283 (quemenes <- dplyr::filter(qecbnew, site_year_month_day == "FINS_Quemenes.2015.09.30")[, c("site_year_month_day", "Nb.Spirobranchus.lamarckii.1B", "Nb.Spirobranchus.lamarckii.2B", "Nb.Spirobranchus.lamarckii.3B", "Nb.Spirobranchus.lamarckii.4B", "Nb.Spirobranchus.lamarckii.5B", "Nb.Spirobranchus.lamarckii.total")]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
284 rm(quemenes) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
285 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
286 seinkilaourou <- dplyr::filter(qecbnew, Site == "FINS_SeinKilaourou") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
287 seinkilaourou <- dplyr::arrange(seinkilaourou, date_fiche) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
288 # same issue with SeinKilaourou |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
289 qecbnew$Nb.Spirobranchus.lamarckii.total <- ifelse(qecbnew$site_year_month_day == "FINS_SeinKilaourou.2015.04.21" & is.na(qecbnew$Nb.Spirobranchus.lamarckii.total), qecbnew$Nb.Spirobranchus.lamarckii.1B, qecbnew$Nb.Spirobranchus.lamarckii.total) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
290 (seinkilaourou <- dplyr::filter(qecbnew, site_year_month_day == "FINS_SeinKilaourou.2015.04.21")[, c("site_year_month_day", "Nb.Spirobranchus.lamarckii.1B", "Nb.Spirobranchus.lamarckii.2B", "Nb.Spirobranchus.lamarckii.3B", "Nb.Spirobranchus.lamarckii.4B", "Nb.Spirobranchus.lamarckii.5B", "Nb.Spirobranchus.lamarckii.total")]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
291 rm(seinkilaourou) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
292 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
293 # some more issues however with "x100"count data |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
294 spirobranchus <- subset(qecbnew, !is.na(qecbnew$Nb.Spirobranchus.lamarckii.1B) & !is.na(qecbnew$Nb.Spirobranchus.lamarckii.2B) & !is.na(qecbnew$Nb.Spirobranchus.lamarckii.3B) & !is.na(qecbnew$Nb.Spirobranchus.lamarckii.4B) & !is.na(qecbnew$Nb.Spirobranchus.lamarckii.5B) & !is.na(qecbnew$Nb.Spirobranchus.lamarckii.total))[, c("site_year_month_day", "Nb.Spirobranchus.lamarckii.1B", "Nb.Spirobranchus.lamarckii.2B", "Nb.Spirobranchus.lamarckii.3B", "Nb.Spirobranchus.lamarckii.4B", "Nb.Spirobranchus.lamarckii.5B", "Nb.Spirobranchus.lamarckii.total")] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
295 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
296 for (i in c(1:nrow(spirobranchus))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
297 spirobranchus$mean.x.100[[i]] <- sum(spirobranchus[i, c(2:6)], na.rm = TRUE) / sum(!is.na(spirobranchus[i, c(2:6)])) * 100 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
298 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
299 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
300 spirobranchus$mean.x.100 <- unlist(spirobranchus$mean.x.100) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
301 spirobranchus$Nb.Spirobranchus.lamarckii.total <- as.numeric(spirobranchus$Nb.Spirobranchus.lamarckii.total) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
302 for (i in c(1:nrow(spirobranchus))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
303 spirobranchus$diff[[i]] <- spirobranchus[i, "Nb.Spirobranchus.lamarckii.total"] - spirobranchus[i, "mean.x.100"] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
304 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
305 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
306 spirobranchus$diff <- abs(as.integer(spirobranchus$diff)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
307 spirobranchus <- dplyr::arrange(spirobranchus, desc(diff), mean.x.100) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
308 spirobranchus <- dplyr::arrange(dplyr::filter(spirobranchus, diff != 0 & mean.x.100 != 0), desc(diff)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
309 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
310 # check it all in the qecbnew df |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
311 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
312 for (i in c(1:nrow(qecbnew))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
313 qecbnew$mean.x.100[[i]] <- |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
314 sum(qecbnew[i, c("Nb.Spirobranchus.lamarckii.1B", "Nb.Spirobranchus.lamarckii.2B", "Nb.Spirobranchus.lamarckii.3B", "Nb.Spirobranchus.lamarckii.4B", "Nb.Spirobranchus.lamarckii.5B")], na.rm = TRUE) / sum(!is.na(qecbnew[i, c("Nb.Spirobranchus.lamarckii.1B", "Nb.Spirobranchus.lamarckii.2B", "Nb.Spirobranchus.lamarckii.3B", "Nb.Spirobranchus.lamarckii.4B", "Nb.Spirobranchus.lamarckii.5B")])) * 100 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
315 } # sum of only NAs/0 = NaN; so replace NaN by Na |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
316 qecbnew$mean.x.100 <- as.character(qecbnew$mean.x.100) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
317 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
318 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
319 for (i in c(1:nrow(qecbnew))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
320 qecbnew$mean.x.100[[i]] <- ifelse(qecbnew$mean.x.100[[i]] == "NaN", NA, qecbnew$mean.x.100[[i]]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
321 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
322 qecbnew$mean.x.100 <- as.integer(qecbnew$mean.x.100) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
323 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
324 qecbnew$Nb.Spirobranchus.lamarckii.total <- as.integer(qecbnew$Nb.Spirobranchus.lamarckii.total) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
325 qecbnew$Nb.Spirobranchus.lamarckii.total.diff <- abs((qecbnew$Nb.Spirobranchus.lamarckii.total - qecbnew$mean.x.100)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
326 spirobranchus_diff <- qecbnew[, c("Nb.Spirobranchus.lamarckii.1B", "Nb.Spirobranchus.lamarckii.2B", "Nb.Spirobranchus.lamarckii.3B", "Nb.Spirobranchus.lamarckii.4B", "Nb.Spirobranchus.lamarckii.5B", "Nb.Spirobranchus.lamarckii.total", "Nb.Spirobranchus.lamarckii.total.ini", "mean.x.100", "Nb.Spirobranchus.lamarckii.total.diff")] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
327 spirobranchus_diff <- dplyr::arrange(spirobranchus_diff, desc(Nb.Spirobranchus.lamarckii.total.diff), mean.x.100) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
328 spirobranchus_diff <- dplyr::arrange(dplyr::filter(spirobranchus_diff, Nb.Spirobranchus.lamarckii.total.diff != 0 & mean.x.100 != 0), desc(Nb.Spirobranchus.lamarckii.total.diff)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
329 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
330 qecbnew$Nb.Spirobranchus.lamarckii.total <- ifelse(qecbnew$Nb.Spirobranchus.lamarckii.total.diff != 0 & qecbnew$mean.x.100 != 0, qecbnew$mean.x.100, qecbnew$Nb.Spirobranchus.lamarckii.total) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
331 spirobranchus_diff <- qecbnew[, c("Nb.Spirobranchus.lamarckii.1B", "Nb.Spirobranchus.lamarckii.2B", "Nb.Spirobranchus.lamarckii.3B", "Nb.Spirobranchus.lamarckii.4B", "Nb.Spirobranchus.lamarckii.5B", "Nb.Spirobranchus.lamarckii.total", "Nb.Spirobranchus.lamarckii.total.ini", "mean.x.100", "Nb.Spirobranchus.lamarckii.total.diff")] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
332 spirobranchus_diff$Nb.Spirobranchus.lamarckii.total.diff <- abs(as.integer(spirobranchus_diff$Nb.Spirobranchus.lamarckii.total.diff)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
333 spirobranchus_diff <- dplyr::arrange(spirobranchus_diff, desc(Nb.Spirobranchus.lamarckii.total.diff), mean.x.100) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
334 spirobranchus_diff <- dplyr::arrange(dplyr::filter(spirobranchus_diff, Nb.Spirobranchus.lamarckii.total.diff != 0 & mean.x.100 != 0), desc(Nb.Spirobranchus.lamarckii.total.diff)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
335 # ok, change made when data x 100 was not correct. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
336 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
337 # finally, change NA by mean.x100 for Spirobranchus total |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
338 qecbnew$Nb.Spirobranchus.lamarckii.total <- as.character(qecbnew$Nb.Spirobranchus.lamarckii.total) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
339 for (i in c(1:nrow(qecbnew))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
340 qecbnew$Nb.Spirobranchus.lamarckii.total[[i]] <- ifelse(qecbnew$Nb.Spirobranchus.lamarckii.total[[i]] %in% c(NA, "NaN", "Inf", "-Inf"), sum(qecbnew[i, c("Nb.Spirobranchus.lamarckii.1B", "Nb.Spirobranchus.lamarckii.2B", "Nb.Spirobranchus.lamarckii.3B", "Nb.Spirobranchus.lamarckii.4B", "Nb.Spirobranchus.lamarckii.5B")], na.rm = TRUE) / sum(!is.na(qecbnew[i, c("Nb.Spirobranchus.lamarckii.1B", "Nb.Spirobranchus.lamarckii.2B", "Nb.Spirobranchus.lamarckii.3B", "Nb.Spirobranchus.lamarckii.4B", "Nb.Spirobranchus.lamarckii.5B")])) * 100, qecbnew$Nb.Spirobranchus.lamarckii.total[[i]]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
341 } # sum of only NAs/0 = NaN; so replace NaN by Na |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
342 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
343 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
344 for (i in c(1:nrow(qecbnew))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
345 qecbnew$Nb.Spirobranchus.lamarckii.total[[i]] <- ifelse(qecbnew$Nb.Spirobranchus.lamarckii.total[[i]] == "NaN", NA, qecbnew$Nb.Spirobranchus.lamarckii.total[[i]]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
346 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
347 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
348 qecbnew$Nb.Spirobranchus.lamarckii.total <- as.integer(qecbnew$Nb.Spirobranchus.lamarckii.total) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
349 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
350 qecbnew$Nb.Spirobranchus.lamarckii.total.diff <- abs(qecbnew$Nb.Spirobranchus.lamarckii.total - qecbnew$Nb.Spirobranchus.lamarckii.total.ini) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
351 spirobranchus_diff <- qecbnew[, c("Nb.Spirobranchus.lamarckii.1B", "Nb.Spirobranchus.lamarckii.2B", "Nb.Spirobranchus.lamarckii.3B", "Nb.Spirobranchus.lamarckii.4B", "Nb.Spirobranchus.lamarckii.5B", "Nb.Spirobranchus.lamarckii.total", "Nb.Spirobranchus.lamarckii.total.ini", "mean.x.100", "Nb.Spirobranchus.lamarckii.total.diff")] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
352 spirobranchus_diff <- dplyr::arrange(spirobranchus_diff, desc(Nb.Spirobranchus.lamarckii.total.diff), mean.x.100) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
353 spirobranchus_diff <- dplyr::arrange(dplyr::filter(spirobranchus_diff, Nb.Spirobranchus.lamarckii.total.diff != 0 & mean.x.100 != 0), desc(Nb.Spirobranchus.lamarckii.total.diff)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
354 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
355 qecbnew <- subset(qecbnew, select = -c(Nb.Spirobranchus.lamarckii.total.ini, mean.x.100, Nb.Spirobranchus.lamarckii.total.diff)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
356 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
357 rm(qecbnew_spirobranchus, spirobranchus, spirobranchus_data, spirobranchus_diff) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
358 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
359 # do the same for spirorbis |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
360 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
361 qecbnew$Nb.spirorbis.total.ini <- qecbnew$Nb.spirorbis.total |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
362 qecbnew$Nb.spirorbis.total <- as.character(qecbnew$Nb.spirorbis.total) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
363 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
364 qecbnew_spirorbis <- (dplyr::filter(qecbnew, Nb.spirorbis.total %in% c(NA, "NaN", "Inf", "-Inf"))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
365 qecbnew_spirorbis[, c("Nb.spirorbis.1A", "Nb.spirorbis.2A", "Nb.spirorbis.3A", "Nb.spirorbis.4A", "Nb.spirorbis.5A")] <- sapply(qecbnew_spirorbis[, c("Nb.spirorbis.1A", "Nb.spirorbis.2A", "Nb.spirorbis.3A", "Nb.spirorbis.4A", "Nb.spirorbis.5A")], as.character) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
366 (spirobranchus_data <- subset(qecbnew_spirorbis, !is.na(qecbnew_spirorbis$Nb.spirorbis.1A) || !is.na(qecbnew_spirorbis$Nb.spirorbis.2A) || !is.na(qecbnew_spirorbis$Nb.spirorbis.3A) || !is.na(qecbnew_spirorbis$Nb.spirorbis.4A) || !is.na(qecbnew_spirorbis$Nb.spirorbis.5A))[, c("site_year_month_day", "Nb.spirorbis.1A", "Nb.spirorbis.2A", "Nb.spirorbis.3A", "Nb.spirorbis.4A", "Nb.spirorbis.5A", "Nb.spirorbis.total")]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
367 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
368 # In contrast to Spirobranchus data, no encoding issues for spirorbis data, cfr when sub-quadrat 1A-5A are ALL encoded, NA for total. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
369 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
370 # some more issues however with "x200"count data |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
371 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
372 spirorbis <- subset(qecbnew, !is.na(qecbnew$Nb.spirorbis.1A) & !is.na(qecbnew$Nb.spirorbis.2A) & !is.na(qecbnew$Nb.spirorbis.3A) & !is.na(qecbnew$Nb.spirorbis.4A) & !is.na(qecbnew$Nb.spirorbis.5A) & !is.na(qecbnew$Nb.spirorbis.total))[, c("site_year_month_day", "Nb.spirorbis.1A", "Nb.spirorbis.2A", "Nb.spirorbis.3A", "Nb.spirorbis.4A", "Nb.spirorbis.5A", "Nb.spirorbis.total")] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
373 for (i in c(1:nrow(spirorbis))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
374 spirorbis$mean.x.200[[i]] <- sum(spirorbis[i, c(2:6)], na.rm = TRUE) / sum(!is.na(spirorbis[i, c(2:6)])) * 200 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
375 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
376 spirorbis$mean.x.200 <- unlist(spirorbis$mean.x.200) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
377 spirorbis$Nb.spirorbis.total <- as.numeric(spirorbis$Nb.spirorbis.total) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
378 for (i in c(1:nrow(spirorbis))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
379 spirorbis$diff[[i]] <- spirorbis[i, "Nb.spirorbis.total"] - spirorbis[i, "mean.x.200"] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
380 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
381 spirorbis$diff <- abs(as.integer(spirorbis$diff)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
382 spirorbis <- dplyr::arrange(spirorbis, desc(diff), mean.x.200) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
383 (gonb_ilotstmichel_2015_04_18 <- dplyr::filter(spirorbis, site_year_month_day == "GONB_IlotStMichel.2015.04.18")) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
384 rm(gonb_ilotstmichel_2015_04_18) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
385 spirorbis <- dplyr::arrange(dplyr::filter(spirorbis, diff != 0 & mean.x.200 != 0), desc(diff)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
386 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
387 # check it all in the qecbnew df |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
388 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
389 for (i in c(1:nrow(qecbnew))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
390 qecbnew$mean.x.200[[i]] <- sum(qecbnew[i, c("Nb.spirorbis.1A", "Nb.spirorbis.2A", "Nb.spirorbis.3A", "Nb.spirorbis.4A", "Nb.spirorbis.5A")], na.rm = TRUE) / sum(!is.na(qecbnew[i, c("Nb.spirorbis.1A", "Nb.spirorbis.2A", "Nb.spirorbis.3A", "Nb.spirorbis.4A", "Nb.spirorbis.5A")])) * 200 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
391 } # sum of only NAs/0 = NaN; so replace NaN by Na |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
392 qecbnew$mean.x.200 <- as.character(qecbnew$mean.x.200) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
393 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
394 for (i in c(1:nrow(qecbnew))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
395 qecbnew$mean.x.200[[i]] <- ifelse(qecbnew$mean.x.200[[i]] == "NaN", NA, qecbnew$mean.x.200[[i]]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
396 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
397 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
398 qecbnew$mean.x.200 <- as.integer(qecbnew$mean.x.200) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
399 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
400 qecbnew$Nb.spirorbis.total <- as.integer(qecbnew$Nb.spirorbis.total) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
401 qecbnew$Nb.spirorbis.total.diff <- abs((qecbnew$Nb.spirorbis.total - qecbnew$mean.x.200)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
402 spirorbis_diff <- qecbnew[, c("Nb.spirorbis.1A", "Nb.spirorbis.2A", "Nb.spirorbis.3A", "Nb.spirorbis.4A", "Nb.spirorbis.5A", "Nb.spirorbis.total", "Nb.spirorbis.total.ini", "mean.x.200", "Nb.spirorbis.total.diff")] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
403 spirorbis_diff <- dplyr::arrange(spirorbis_diff, desc(Nb.spirorbis.total.diff), mean.x.200) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
404 spirorbis_diff <- dplyr::arrange(dplyr::filter(spirorbis_diff, Nb.spirorbis.total.diff != 0 & mean.x.200 != 0), desc(Nb.spirorbis.total.diff)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
405 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
406 qecbnew$Nb.spirorbis.total <- ifelse(qecbnew$Nb.spirorbis.total.diff != 0 & qecbnew$mean.x.200 != 0, qecbnew$mean.x.200, qecbnew$Nb.spirorbis.total) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
407 spirorbis_diff <- qecbnew[, c("Nb.spirorbis.1A", "Nb.spirorbis.2A", "Nb.spirorbis.3A", "Nb.spirorbis.4A", "Nb.spirorbis.5A", "Nb.spirorbis.total", "Nb.spirorbis.total.ini", "mean.x.200", "Nb.spirorbis.total.diff")] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
408 spirorbis_diff$Nb.spirorbis.total.diff <- abs(as.integer(spirorbis_diff$Nb.spirorbis.total.diff)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
409 spirorbis_diff <- dplyr::arrange(spirorbis_diff, desc(Nb.spirorbis.total.diff), mean.x.200) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
410 spirorbis_diff <- dplyr::arrange(dplyr::filter(spirorbis_diff, Nb.spirorbis.total.diff != 0 & mean.x.200 != 0), desc(Nb.spirorbis.total.diff)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
411 # ok, change made when data x 200 was not correct. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
412 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
413 # finally, change NA by mean.x200 for spirorbis total |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
414 qecbnew$Nb.spirorbis.total <- as.character(qecbnew$Nb.spirorbis.total) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
415 for (i in c(1:nrow(qecbnew))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
416 qecbnew$Nb.spirorbis.total[[i]] <- ifelse(qecbnew$Nb.spirorbis.total[[i]] %in% c(NA, "NaN", "Inf", "-Inf"), sum(qecbnew[i, c("Nb.spirorbis.1A", "Nb.spirorbis.2A", "Nb.spirorbis.3A", "Nb.spirorbis.4A", "Nb.spirorbis.5A")], na.rm = TRUE) / sum(!is.na(qecbnew[i, c("Nb.spirorbis.1A", "Nb.spirorbis.2A", "Nb.spirorbis.3A", "Nb.spirorbis.4A", "Nb.spirorbis.5A")])) * 200, qecbnew$Nb.spirorbis.total[[i]]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
417 } # sum of only NAs/0 = NaN; so replace NaN by Na |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
418 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
419 for (i in c(1:nrow(qecbnew))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
420 qecbnew$Nb.spirorbis.total[[i]] <- ifelse(qecbnew$Nb.spirorbis.total[[i]] == "NaN", NA, qecbnew$Nb.spirorbis.total[[i]]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
421 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
422 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
423 qecbnew$Nb.spirorbis.total <- as.integer(qecbnew$Nb.spirorbis.total) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
424 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
425 qecbnew$Nb.spirorbis.total.diff <- abs(qecbnew$Nb.spirorbis.total - qecbnew$Nb.spirorbis.total.ini) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
426 spirorbis_diff <- qecbnew[, c("Nb.spirorbis.1A", "Nb.spirorbis.2A", "Nb.spirorbis.3A", "Nb.spirorbis.4A", "Nb.spirorbis.5A", "Nb.spirorbis.total", "Nb.spirorbis.total.ini", "mean.x.200", "Nb.spirorbis.total.diff")] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
427 spirorbis_diff <- dplyr::arrange(spirorbis_diff, desc(Nb.spirorbis.total.diff), mean.x.200) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
428 spirorbis_diff <- dplyr::arrange(dplyr::filter(spirorbis_diff, Nb.spirorbis.total.diff != 0 & mean.x.200 != 0), desc(Nb.spirorbis.total.diff)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
429 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
430 qecbnew <- subset(qecbnew, select = -c(Nb.spirorbis.total.ini, mean.x.200, Nb.spirorbis.total.diff)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
431 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
432 rm(qecbnew_spirorbis, spirorbis, spirobranchus_data, spirorbis_diff, i) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
433 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
434 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
435 # dplyr::filter for abnormal data, based on histogram distribution of data |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
436 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
437 dplyr::filter(qecbnew, X..algues.brunes > 100)[, c("Site", "date_fiche", "Type.Bloc", "Numéro.Bloc.échantillon", "Face", "X..algues.brunes")] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
438 qecbnew$X..algues.brunes <- ifelse(qecbnew$X..algues.brunes > 100, 100, qecbnew$X..algues.brunes) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
439 dplyr::filter(qecbnew, X..algues.rouges > 100)[, c("Site", "date_fiche", "Type.Bloc", "Numéro.Bloc.échantillon", "Face", "X..algues.rouges")] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
440 qecbnew$X..algues.rouges <- ifelse(qecbnew$X..algues.rouges > 100, 100, qecbnew$X..algues.rouges) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
441 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
442 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
443 ## SCRIPT I - NAs <- 0 ; cfr previous comment makes no sense to have NA encoded when the presence of an organism is in reality = 0 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
444 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
445 # We are facing an issues with NA observations, because either they were not measured/counted, then they are effectively NAs; or these NAs = indeed "0"; but I cannot have NAs for variables that are included in the index determination, cfr if 5+0 = 5, 5+NA = NA; see for example site_year_month_day == "ARMO_Bilfot.2014.04.28", Nb.Spirobranchus.lamarckii.total is NA ... |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
446 # I theregore change these NAs by 0 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
447 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
448 # replace NAs by "0" for variables used in qecb determination |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
449 qecbnew[, c("X..algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
450 "X..algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
451 "X..Lithophyllum", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
452 "X..Cladophora", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
453 "Nb.Littorina.obtusata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
454 "Nb.Gibbula.cineraria", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
455 "Nb.Gibbula.pennanti", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
456 "Nb.Gibbula.umbilicalis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
457 "X..Eponges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
458 "X..Ascidies.Coloniales", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
459 "X..Ascidies.Solitaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
460 "X..Bryozoaires.Dresses", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
461 "X..algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
462 "X..Roche.Nue", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
463 "Nb.spirorbis.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
464 "X..Balanes.Vivantes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
465 "Nb.Spirobranchus.lamarckii.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
466 "X..Surface.Accolement")] <- lapply(qecbnew[, |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
467 c("X..algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
468 "X..algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
469 "X..Lithophyllum", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
470 "X..Cladophora", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
471 "Nb.Littorina.obtusata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
472 "Nb.Gibbula.cineraria", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
473 "Nb.Gibbula.pennanti", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
474 "Nb.Gibbula.umbilicalis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
475 "X..Eponges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
476 "X..Ascidies.Coloniales", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
477 "X..Ascidies.Solitaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
478 "X..Bryozoaires.Dresses", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
479 "X..algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
480 "X..Roche.Nue", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
481 "Nb.spirorbis.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
482 "X..Balanes.Vivantes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
483 "Nb.Spirobranchus.lamarckii.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
484 "X..Surface.Accolement")], |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
485 function(x) replace(x, is.na(x), 0)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
486 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
487 # and also replace NA for bivalve by 0 for EGMP and BASQ surveys cfr for accollement correction later on. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
488 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
489 qecbnew$X..Mytilus.sp. <- ifelse((substr(qecbnew$Site, 1, 4) %in% c("EGMP", "BASQ")) & is.na(qecbnew$X..Mytilus.sp.), 0, qecbnew$X..Mytilus.sp.) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
490 qecbnew$Nb.Crassostrea.gigas <- ifelse((substr(qecbnew$Site, 1, 4) %in% c("EGMP", "BASQ")) & is.na(qecbnew$Nb.Crassostrea.gigas), 0, qecbnew$Nb.Crassostrea.gigas) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
491 qecbnew$Nb.Ostrea.edulis <- ifelse((substr(qecbnew$Site, 1, 4) %in% c("EGMP", "BASQ")) & is.na(qecbnew$Nb.Ostrea.edulis), 0, qecbnew$Nb.Ostrea.edulis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
492 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
493 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
494 # add a region variable |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
495 region <- rep(NA, nrow(qecbnew)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
496 qecbnew <- tibble::add_column(qecbnew, region, .after = "Site_bis") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
497 qecbnew$region <- ifelse(qecbnew$Site %in% c("EGMP_GroinCou", "EGMP_PasEmsembert", "EGMP_BreeBains", "EGMP_PerreAntiochat", "EGMP_Chassiron", "BASQ_FlotsBleusZP", "BASQ_FlotsBleusZF"), "EGMP.BASQ", "Bretagne") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
498 rm(region) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
499 qecbnew <- dplyr::arrange(qecbnew, region, site_year_month_day, Type.Bloc, Numéro.Bloc.échantillon, Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
500 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
501 # accolement function according to recent 'retournement' |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
502 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
503 ## before I go further ahead, I have to correct for surface d'accollement for several variable for BM.FI !! |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
504 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
505 # not the same file name between script qecb script (qecbNew) and this script (qecbNew); doesn't matter, only appears here in the first dplyr::filter lines. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
506 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
507 qecbnew <- tibble::add_column(qecbnew, terri_ = substr(qecbnew$Site, 1, 4), .after = "Site_bis") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
508 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
509 qecbnew$X..Eponges_ini <- qecbnew$X..Eponges |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
510 qecbnew$X..Ascidies.Coloniales_ini <- qecbnew$X..Ascidies.Coloniales |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
511 qecbnew$X..Ascidies.Solitaires_ini <- qecbnew$X..Ascidies.Solitaires |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
512 qecbnew$X..Bryozoaires.Dresses_ini <- qecbnew$X..Bryozoaires.Dresses |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
513 qecbnew$X..Lithophyllum_ini <- qecbnew$X..Lithophyllum |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
514 qecbnew$X..Balanes.Vivantes_ini <- qecbnew$X..Balanes.Vivantes |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
515 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
516 df_bm_fs <- qecbnew %>% dplyr::filter(Type.Bloc == "Bloc mobile" & Face == "face supérieure") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
517 df_bm_fi <- qecbnew %>% dplyr::filter(Type.Bloc == "Bloc mobile" & Face == "face inférieure") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
518 df_bf <- qecbnew %>% dplyr::filter(Type.Bloc != "Bloc mobile") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
519 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
520 `%notin%` <- Negate(`%in%`) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
521 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
522 acco_fct <- function(var_) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
523 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
524 df_bm_fi$var_cor.acco. <<- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
525 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
526 for (i in c(1:nrow(df_bm_fi))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
527 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
528 df_bm_fi$var_cor.acco.[[i]] <<- if (df_bm_fi$terri_[[i]] %notin% c("EGMP", "BASQ")) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
529 ifelse(#df_$Couleur.dominante %in% c("Rouge", "Brune", "Brune-Rouge") || |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
530 df_bm_fs$Couleur.dominante[[i]] %in% c("Blanche", "Verte", "Blanche-Verte", "Colorée"), df_bm_fi[i, var_] / (100 - df_bm_fi$X..Surface.Accolement[[i]]) * 100, df_bm_fi[i, var_]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
531 } else { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
532 ifelse(df_bm_fs$Couleur.dominante[[i]] %in% c("Blanche", "Verte", "Blanche-Verte", "Colorée") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
533 & df_bm_fi$X..Surface.Accolement[[i]] != 0 # I have to use it in dplyr::filter this time as well for EGMP- BASQ (but not for Bretagne, although could be added, same result); identical/repeated measure for BM.FI and BM.FS |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
534 & df_bm_fs$X..Mytilus.sp.[[i]] == 0, df_bm_fi[i, var_] / (100 - df_bm_fi$X..Surface.Accolement[[i]]) * 100, df_bm_fi[i, var_]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
535 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
536 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
537 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
538 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
539 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
540 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
541 # I would only consider colors in c("Rouge", "Brune", "Brune-Rouge") for BM.FI correction [ and not the series c("Blanche-Brune", "Rouge", "Brune", "Blanche-Rouge", "Brune-Rouge", "Rouge-Verte", "Brune-Verte") ] ; and for BM.FS, the list c("Blanche", "Verte", "Colorée") => we do the correction for BM.FI accollement based on BM.FS color !!! |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
542 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
543 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
544 # apply acco_fct to BM.FI variables |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
545 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
546 apply_acco_fct <- function(var_) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
547 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
548 show(sort(df_bm_fi[, var_], decreasing = TRUE, index.return = FALSE)[1:50]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
549 pre_ <- as.vector(df_bm_fi[, var_]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
550 acco_fct(var_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
551 df_bm_fi <<- tibble::add_column(df_bm_fi, var_cor. = df_bm_fi$var_cor.acco., .after = var_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
552 show(sort(df_bm_fi$var_cor., decreasing = TRUE, index.return = FALSE)[1:50]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
553 df_bm_fi$var_cor. <<- as.numeric(ifelse(as.character(df_bm_fi$var_cor.) %in% c(NA, "NaN", "-Inf", "Inf"), "0", as.character(df_bm_fi$var_cor.))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
554 df_bm_fi$var_cor. <<- ifelse(df_bm_fi$var_cor. > 100, 100, df_bm_fi$var_cor.) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
555 show(sort(df_bm_fi$var_cor., decreasing = TRUE, index.return = FALSE)[1:50]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
556 show(length(na.omit(which(abs(as.vector(df_bm_fi$var_cor.) - pre_) != 0))) / na.omit(length(df_bm_fi$var_cor.)) * 100) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
557 par(mfrow = c(1, 3)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
558 hist(pre_, main = var_, xlab = "pre-corection") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
559 hist(df_bm_fi$var_cor., main = var_, xlab = "post-corection") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
560 hist(df_bm_fi[as.vector(which(abs(as.vector(df_bm_fi$var_cor.) - pre_) != 0)), var_], main = var_, xlab = "diff. post-pre != 0") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
561 par(mfrow = c(1, 1)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
562 df_bm_fi <<- df_bm_fi[, -which(names(df_bm_fi) %in% c(var_, "var_cor.acco."))] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
563 colnames(df_bm_fi)[colnames(df_bm_fi) == "var_cor."] <<- var_ |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
564 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
565 rm(pre_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
566 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
567 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
568 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
569 apply_acco_fct("X..Eponges") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
570 apply_acco_fct("X..Ascidies.Coloniales") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
571 apply_acco_fct("X..Ascidies.Solitaires") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
572 apply_acco_fct("X..Bryozoaires.Dresses") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
573 apply_acco_fct("X..Lithophyllum") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
574 apply_acco_fct("X..Balanes.Vivantes") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
575 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
576 qecbnew <- dplyr::bind_rows(df_bm_fs, df_bm_fi) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
577 qecbnew <- dplyr::bind_rows(qecbnew, df_bf) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
578 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
579 qecbnew <- dplyr::arrange(qecbnew, region, site_year_month_day, Type.Bloc, Numéro.Bloc.échantillon, Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
580 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
581 # do remove some more data ... |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
582 # "FINS_Quemenes.2020.10.16", bad encoding, I let know Anna Capietto to make changes => was corrected normally, so unactivate next time I download ESTAMP data |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
583 qecbnew <- dplyr::filter(qecbnew, site_year_month_day != "FINS_Quemenes.2020.10.16") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
584 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
585 # save the final qecbnew df_ |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
586 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
587 qecb <- qecbnew |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
588 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
589 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
590 `%notin%` <- Negate(`%in%`) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
591 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
592 ## reorder and/or create new variables |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
593 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
594 # variable site_year_month_day moved for clarity purpose, not needed necessarily |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
595 qecb <- tibble::add_column(qecb, qecb$site_year_month_day, .after = "Site_bis") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
596 qecb <- qecb[, -which(names(qecb) %in% c("site_year_month_day"))] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
597 qecb <- dplyr::rename(qecb, site_year_month_day = `qecb$site_year_month_day`) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
598 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
599 # new variable period (nothing to see with the existing périod variable) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
600 period <- rep(NA, nrow(qecb)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
601 qecb <- tibble::add_column(qecb, period, .after = "Day") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
602 qecb$period <- ifelse(as.numeric(qecb$Month) < 7, "p1", "p2") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
603 qecb$period <- as.factor(qecb$period) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
604 rm(period) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
605 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
606 qecb <- dplyr::arrange(qecb, region, site_year_month_day, Type.Bloc, Numéro.Bloc.échantillon, Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
607 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
608 # NB: les infos surface d'accolement sont dupliquées de la face inf vers la face sup de blocs mobiles (même si peu de sens d'avoir cette info pour les face sup ...) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
609 # NB: les data "Abondance ressources ciblées par pêcheurs à pied" présentes uniquement pour les blocs mobiles sont dupliquées entre face inf et face sup. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
610 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
611 ## SCRIPT I - NAs <- 0 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
612 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
613 # already performed for part in the CB_qecb script ; but here I also consider mobile organisms, logical observation (or not) according to boulders, faces etc ... so more complete. Could be some kind of script fusion to only keep Na to 0 correction in one script, i.e. moving this script to the CB_qecb script ... |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
614 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
615 bretagne_bm <- dplyr::filter(qecb, region == "Bretagne" & Type.Bloc == "Bloc mobile") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
616 bretagne_bf <- dplyr::filter(qecb, region == "Bretagne" & Type.Bloc %in% c("Bloc fixé", "Roche en place")) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
617 egmp_basq_bm <- dplyr::filter(qecb, region == "EGMP.BASQ" & Type.Bloc == "Bloc mobile") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
618 egmp_basq_bf <- dplyr::filter(qecb, region == "EGMP.BASQ" & Type.Bloc %in% c("Bloc fixé", "Roche en place")) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
619 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
620 # replace NAs by "0" for variables used in qecb determination |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
621 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
622 bretagne_bm[, c( |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
623 "X..algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
624 "Strate.algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
625 "X..algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
626 "Strate.algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
627 "X..algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
628 "Strate.algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
629 "X..Cladophora", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
630 "X..Lithophyllum", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
631 "X..Recouvrement.Sediment", # is NA, then replace by 0 as well because no sense to have a NA value for "% recouvrement sédiment" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
632 #"Type.Sediment", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
633 "X..Roche.Nue", # is NA, then replace by 0 as well because no sense to have a NA value for "% roche nue" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
634 "Nb.Littorina.obtusata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
635 "Nb.Gibbula.cineraria", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
636 "Nb.Gibbula.pennanti", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
637 "Nb.Gibbula.umbilicalis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
638 "Nb.Phallusia.mamillata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
639 "Nb.Tethya.aurantium", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
640 #"Nb.Spirobranchus.lamarckii.1B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
641 #"Nb.Spirobranchus.lamarckii.2B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
642 #"Nb.Spirobranchus.lamarckii.3B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
643 #"Nb.Spirobranchus.lamarckii.4B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
644 #"Nb.Spirobranchus.lamarckii.5B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
645 "Nb.Spirobranchus.lamarckii.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
646 #"Nb.spirorbis.1A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
647 #"Nb.spirorbis.2A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
648 #"Nb.spirorbis.3A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
649 #"Nb.spirorbis.4A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
650 #"Nb.spirorbis.5A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
651 "Nb.spirorbis.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
652 #.."Nb.Crassostrea.gigas", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
653 #.."Nb.Ostrea.edulis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
654 #.."X..Mytilus.sp.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
655 #.."X..Hermelles", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
656 #.."X..Hydraires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
657 "X..Eponges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
658 "X..Ascidies.Coloniales", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
659 "X..Ascidies.Solitaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
660 "X..Bryozoaires.Dresses", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
661 "X..Balanes.Vivantes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
662 #"Commentaires.Avant", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
663 "X..Surface.Accolement", # is NA, then replace by 0 as well because no sense to have a NA value for "% surface accolement" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
664 #"Type.sustrat.observé", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
665 #"Commentaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
666 "Nb.Cancer.pagurus..Tourteau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
667 "Nb.Necora.puber..Etrille.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
668 "Nb.Carcinus.maenas..Crabe.vert.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
669 "Nb.Nucella.lapilus..Pourpre.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
670 #.."Nb.Eriphia.verrucosa..Crabe.verruqueux.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
671 #.."Nb.Octopus.vulgaris..Poulpe.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
672 "Nb.Galathea..Galathées.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
673 #.."Nb.Paracentrotus.lividus..Oursin.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
674 "Nb.Lophozozymus.incisus..ancien.Xantho.incisus.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
675 "Nb.Palaemon.sp..Crevette.bouquet.ou.crevette.rose.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
676 "Nb.Haliotis.tuberculata..Ormeau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
677 #"Nb.Stramonita.haemastoma..Pourpre.bouche.de.sang.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
678 "Nb.Littorina.littorea..Bigorneau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
679 "Nb.Xantho.pilipes..Xanthe.poilu.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
680 "Nb.Mimachlamys.varia..Pétoncle.noir." |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
681 ) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
682 ] <- lapply(bretagne_bm[, c( |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
683 "X..algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
684 "Strate.algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
685 "X..algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
686 "Strate.algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
687 "X..algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
688 "Strate.algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
689 "X..Cladophora", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
690 "X..Lithophyllum", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
691 "X..Recouvrement.Sediment", # is NA, then replace by 0 as well because no sense to have a NA value for "% recouvrement sédiment" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
692 #"Type.Sediment", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
693 "X..Roche.Nue", # is NA, then replace by 0 as well because no sense to have a NA value for "% roche nue" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
694 "Nb.Littorina.obtusata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
695 "Nb.Gibbula.cineraria", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
696 "Nb.Gibbula.pennanti", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
697 "Nb.Gibbula.umbilicalis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
698 "Nb.Phallusia.mamillata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
699 "Nb.Tethya.aurantium", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
700 #"Nb.Spirobranchus.lamarckii.1B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
701 #"Nb.Spirobranchus.lamarckii.2B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
702 #"Nb.Spirobranchus.lamarckii.3B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
703 #"Nb.Spirobranchus.lamarckii.4B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
704 #"Nb.Spirobranchus.lamarckii.5B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
705 "Nb.Spirobranchus.lamarckii.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
706 #"Nb.spirorbis.1A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
707 #"Nb.spirorbis.2A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
708 #"Nb.spirorbis.3A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
709 #"Nb.spirorbis.4A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
710 #"Nb.spirorbis.5A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
711 "Nb.spirorbis.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
712 #.."Nb.Crassostrea.gigas", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
713 #.."Nb.Ostrea.edulis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
714 #.."X..Mytilus.sp.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
715 #.."X..Hermelles", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
716 #.."X..Hydraires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
717 "X..Eponges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
718 "X..Ascidies.Coloniales", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
719 "X..Ascidies.Solitaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
720 "X..Bryozoaires.Dresses", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
721 "X..Balanes.Vivantes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
722 #"Commentaires.Avant", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
723 "X..Surface.Accolement", # is NA, then replace by 0 as well because no sense to have a NA value for "% surface accolement" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
724 #"Type.sustrat.observé", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
725 #"Commentaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
726 "Nb.Cancer.pagurus..Tourteau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
727 "Nb.Necora.puber..Etrille.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
728 "Nb.Carcinus.maenas..Crabe.vert.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
729 "Nb.Nucella.lapilus..Pourpre.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
730 #.."Nb.Eriphia.verrucosa..Crabe.verruqueux.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
731 #.."Nb.Octopus.vulgaris..Poulpe.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
732 "Nb.Galathea..Galathées.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
733 #.."Nb.Paracentrotus.lividus..Oursin.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
734 "Nb.Lophozozymus.incisus..ancien.Xantho.incisus.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
735 "Nb.Palaemon.sp..Crevette.bouquet.ou.crevette.rose.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
736 "Nb.Haliotis.tuberculata..Ormeau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
737 #"Nb.Stramonita.haemastoma..Pourpre.bouche.de.sang.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
738 "Nb.Littorina.littorea..Bigorneau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
739 "Nb.Xantho.pilipes..Xanthe.poilu.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
740 "Nb.Mimachlamys.varia..Pétoncle.noir." |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
741 ) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
742 ], function(x) replace(x, is.na(x), 0)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
743 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
744 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
745 # bretagne_bf |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
746 bretagne_bf[, c( |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
747 "X..algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
748 "Strate.algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
749 "X..algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
750 "Strate.algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
751 "X..algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
752 "Strate.algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
753 "X..Cladophora", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
754 "X..Lithophyllum", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
755 "X..Recouvrement.Sediment", # is NA, then replace by 0 as well because no sense to have a NA value for "% recouvrement sédiment" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
756 #"Type.Sediment", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
757 "X..Roche.Nue", # is NA, then replace by 0 as well because no sense to have a NA value for "% roche nue" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
758 "Nb.Littorina.obtusata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
759 "Nb.Gibbula.cineraria", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
760 "Nb.Gibbula.pennanti", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
761 "Nb.Gibbula.umbilicalis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
762 "Nb.Phallusia.mamillata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
763 "Nb.Tethya.aurantium", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
764 #"Nb.Spirobranchus.lamarckii.1B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
765 #"Nb.Spirobranchus.lamarckii.2B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
766 #"Nb.Spirobranchus.lamarckii.3B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
767 #"Nb.Spirobranchus.lamarckii.4B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
768 #"Nb.Spirobranchus.lamarckii.5B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
769 "Nb.Spirobranchus.lamarckii.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
770 #"Nb.spirorbis.1A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
771 #"Nb.spirorbis.2A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
772 #"Nb.spirorbis.3A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
773 #"Nb.spirorbis.4A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
774 #"Nb.spirorbis.5A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
775 "Nb.spirorbis.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
776 #.."Nb.Crassostrea.gigas", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
777 #.."Nb.Ostrea.edulis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
778 #.."X..Mytilus.sp.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
779 #.."X..Hermelles", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
780 #.."X..Hydraires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
781 "X..Eponges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
782 "X..Ascidies.Coloniales", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
783 "X..Ascidies.Solitaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
784 "X..Bryozoaires.Dresses", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
785 "X..Balanes.Vivantes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
786 #"Commentaires.Avant", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
787 "X..Surface.Accolement"#, # is NA, then replace by 0 as well because no sense to have a NA value for "% surface accolement" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
788 #"Type.sustrat.observé", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
789 #"Commentaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
790 #."Nb.Cancer.pagurus..Tourteau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
791 #.."Nb.Necora.puber..Etrille.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
792 #."Nb.Carcinus.maenas..Crabe.vert.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
793 #."Nb.Nucella.lapilus..Pourpre.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
794 #.."Nb.Eriphia.verrucosa..Crabe.verruqueux.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
795 #.."Nb.Octopus.vulgaris..Poulpe.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
796 #."Nb.Galathea..Galathées.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
797 #.."Nb.Paracentrotus.lividus..Oursin.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
798 #."Nb.Lophozozymus.incisus..ancien.Xantho.incisus.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
799 #."Nb.Palaemon.sp..Crevette.bouquet.ou.crevette.rose.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
800 #."Nb.Haliotis.tuberculata..Ormeau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
801 #."Nb.Stramonita.haemastoma..Pourpre.bouche.de.sang.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
802 #."Nb.Littorina.littorea..Bigorneau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
803 #."Nb.Xantho.pilipes..Xanthe.poilu.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
804 #."Nb.Mimachlamys.varia..Pétoncle.noir." |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
805 ) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
806 ] <- lapply(bretagne_bf[, c( |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
807 "X..algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
808 "Strate.algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
809 "X..algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
810 "Strate.algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
811 "X..algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
812 "Strate.algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
813 "X..Cladophora", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
814 "X..Lithophyllum", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
815 "X..Recouvrement.Sediment", # is NA, then replace by 0 as well because no sense to have a NA value for "% recouvrement sédiment" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
816 #"Type.Sediment", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
817 "X..Roche.Nue", # is NA, then replace by 0 as well because no sense to have a NA value for "% roche nue" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
818 "Nb.Littorina.obtusata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
819 "Nb.Gibbula.cineraria", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
820 "Nb.Gibbula.pennanti", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
821 "Nb.Gibbula.umbilicalis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
822 "Nb.Phallusia.mamillata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
823 "Nb.Tethya.aurantium", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
824 #"Nb.Spirobranchus.lamarckii.1B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
825 #"Nb.Spirobranchus.lamarckii.2B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
826 #"Nb.Spirobranchus.lamarckii.3B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
827 #"Nb.Spirobranchus.lamarckii.4B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
828 #"Nb.Spirobranchus.lamarckii.5B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
829 "Nb.Spirobranchus.lamarckii.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
830 #"Nb.spirorbis.1A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
831 #"Nb.spirorbis.2A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
832 #"Nb.spirorbis.3A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
833 #"Nb.spirorbis.4A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
834 #"Nb.spirorbis.5A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
835 "Nb.spirorbis.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
836 #.."Nb.Crassostrea.gigas", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
837 #.."Nb.Ostrea.edulis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
838 #.."X..Mytilus.sp.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
839 #.."X..Hermelles", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
840 #.."X..Hydraires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
841 "X..Eponges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
842 "X..Ascidies.Coloniales", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
843 "X..Ascidies.Solitaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
844 "X..Bryozoaires.Dresses", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
845 "X..Balanes.Vivantes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
846 #"Commentaires.Avant", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
847 "X..Surface.Accolement"#, # is NA, then replace by 0 as well because no sense to have a NA value for "% surface accolement" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
848 #"Type.sustrat.observé", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
849 #"Commentaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
850 #."Nb.Cancer.pagurus..Tourteau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
851 #.."Nb.Necora.puber..Etrille.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
852 #."Nb.Carcinus.maenas..Crabe.vert.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
853 #."Nb.Nucella.lapilus..Pourpre.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
854 #.."Nb.Eriphia.verrucosa..Crabe.verruqueux.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
855 #.."Nb.Octopus.vulgaris..Poulpe.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
856 #."Nb.Galathea..Galathées.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
857 #.."Nb.Paracentrotus.lividus..Oursin.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
858 #."Nb.Lophozozymus.incisus..ancien.Xantho.incisus.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
859 #."Nb.Palaemon.sp..Crevette.bouquet.ou.crevette.rose.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
860 #."Nb.Haliotis.tuberculata..Ormeau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
861 #."Nb.Stramonita.haemastoma..Pourpre.bouche.de.sang.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
862 #."Nb.Littorina.littorea..Bigorneau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
863 #."Nb.Xantho.pilipes..Xanthe.poilu.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
864 #."Nb.Mimachlamys.varia..Pétoncle.noir." |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
865 ) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
866 ], function(x) replace(x, is.na(x), 0)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
867 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
868 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
869 # egmp_basq_bm |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
870 egmp_basq_bm[, c( |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
871 "X..algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
872 "Strate.algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
873 "X..algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
874 "Strate.algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
875 "X..algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
876 "Strate.algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
877 "X..Cladophora", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
878 "X..Lithophyllum", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
879 "X..Recouvrement.Sediment", # is NA, then replace by 0 as well because no sense to have a NA value for "% recouvrement sédiment" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
880 #"Type.Sediment", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
881 "X..Roche.Nue", # is NA, then replace by 0 as well because no sense to have a NA value for "% roche nue" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
882 "Nb.Littorina.obtusata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
883 "Nb.Gibbula.cineraria", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
884 "Nb.Gibbula.pennanti", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
885 "Nb.Gibbula.umbilicalis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
886 "Nb.Phallusia.mamillata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
887 "Nb.Tethya.aurantium", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
888 #"Nb.Spirobranchus.lamarckii.1B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
889 #"Nb.Spirobranchus.lamarckii.2B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
890 #"Nb.Spirobranchus.lamarckii.3B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
891 #"Nb.Spirobranchus.lamarckii.4B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
892 #"Nb.Spirobranchus.lamarckii.5B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
893 "Nb.Spirobranchus.lamarckii.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
894 #"Nb.spirorbis.1A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
895 #"Nb.spirorbis.2A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
896 #"Nb.spirorbis.3A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
897 #"Nb.spirorbis.4A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
898 #"Nb.spirorbis.5A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
899 "Nb.spirorbis.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
900 "Nb.Crassostrea.gigas", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
901 "Nb.Ostrea.edulis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
902 "X..Mytilus.sp.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
903 "X..Hermelles", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
904 "X..Hydraires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
905 "X..Eponges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
906 "X..Ascidies.Coloniales", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
907 "X..Ascidies.Solitaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
908 "X..Bryozoaires.Dresses", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
909 "X..Balanes.Vivantes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
910 #"Commentaires.Avant", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
911 "X..Surface.Accolement", # is NA, then replace by 0 as well because no sense to have a NA value for "% surface accolement" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
912 #"Type.sustrat.observé", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
913 #"Commentaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
914 "Nb.Cancer.pagurus..Tourteau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
915 "Nb.Necora.puber..Etrille.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
916 "Nb.Carcinus.maenas..Crabe.vert.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
917 "Nb.Nucella.lapilus..Pourpre.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
918 "Nb.Eriphia.verrucosa..Crabe.verruqueux.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
919 "Nb.Octopus.vulgaris..Poulpe.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
920 "Nb.Galathea..Galathées.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
921 "Nb.Paracentrotus.lividus..Oursin.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
922 "Nb.Lophozozymus.incisus..ancien.Xantho.incisus.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
923 "Nb.Palaemon.sp..Crevette.bouquet.ou.crevette.rose.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
924 "Nb.Haliotis.tuberculata..Ormeau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
925 "Nb.Stramonita.haemastoma..Pourpre.bouche.de.sang.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
926 "Nb.Littorina.littorea..Bigorneau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
927 "Nb.Xantho.pilipes..Xanthe.poilu.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
928 "Nb.Mimachlamys.varia..Pétoncle.noir." |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
929 ) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
930 ] <- lapply(egmp_basq_bm[, c( |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
931 "X..algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
932 "Strate.algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
933 "X..algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
934 "Strate.algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
935 "X..algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
936 "Strate.algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
937 "X..Cladophora", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
938 "X..Lithophyllum", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
939 "X..Recouvrement.Sediment", # is NA, then replace by 0 as well because no sense to have a NA value for "% recouvrement sédiment" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
940 #"Type.Sediment", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
941 "X..Roche.Nue", # is NA, then replace by 0 as well because no sense to have a NA value for "% roche nue" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
942 "Nb.Littorina.obtusata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
943 "Nb.Gibbula.cineraria", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
944 "Nb.Gibbula.pennanti", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
945 "Nb.Gibbula.umbilicalis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
946 "Nb.Phallusia.mamillata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
947 "Nb.Tethya.aurantium", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
948 #"Nb.Spirobranchus.lamarckii.1B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
949 #"Nb.Spirobranchus.lamarckii.2B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
950 #"Nb.Spirobranchus.lamarckii.3B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
951 #"Nb.Spirobranchus.lamarckii.4B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
952 #"Nb.Spirobranchus.lamarckii.5B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
953 "Nb.Spirobranchus.lamarckii.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
954 #"Nb.spirorbis.1A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
955 #"Nb.spirorbis.2A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
956 #"Nb.spirorbis.3A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
957 #"Nb.spirorbis.4A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
958 #"Nb.spirorbis.5A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
959 "Nb.spirorbis.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
960 "Nb.Crassostrea.gigas", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
961 "Nb.Ostrea.edulis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
962 "X..Mytilus.sp.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
963 "X..Hermelles", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
964 "X..Hydraires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
965 "X..Eponges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
966 "X..Ascidies.Coloniales", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
967 "X..Ascidies.Solitaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
968 "X..Bryozoaires.Dresses", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
969 "X..Balanes.Vivantes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
970 #"Commentaires.Avant", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
971 "X..Surface.Accolement", # is NA, then replace by 0 as well because no sense to have a NA value for "% surface accolement" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
972 #"Type.sustrat.observé", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
973 #"Commentaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
974 "Nb.Cancer.pagurus..Tourteau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
975 "Nb.Necora.puber..Etrille.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
976 "Nb.Carcinus.maenas..Crabe.vert.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
977 "Nb.Nucella.lapilus..Pourpre.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
978 "Nb.Eriphia.verrucosa..Crabe.verruqueux.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
979 "Nb.Octopus.vulgaris..Poulpe.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
980 "Nb.Galathea..Galathées.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
981 "Nb.Paracentrotus.lividus..Oursin.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
982 "Nb.Lophozozymus.incisus..ancien.Xantho.incisus.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
983 "Nb.Palaemon.sp..Crevette.bouquet.ou.crevette.rose.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
984 "Nb.Haliotis.tuberculata..Ormeau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
985 "Nb.Stramonita.haemastoma..Pourpre.bouche.de.sang.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
986 "Nb.Littorina.littorea..Bigorneau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
987 "Nb.Xantho.pilipes..Xanthe.poilu.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
988 "Nb.Mimachlamys.varia..Pétoncle.noir." |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
989 ) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
990 ], function(x) replace(x, is.na(x), 0)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
991 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
992 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
993 # egmp_basq_bf |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
994 egmp_basq_bf[, c( |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
995 "X..algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
996 "Strate.algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
997 "X..algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
998 "Strate.algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
999 "X..algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1000 "Strate.algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1001 "X..Cladophora", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1002 "X..Lithophyllum", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1003 "X..Recouvrement.Sediment", # is NA, then replace by 0 as well because no sense to have a NA value for "% recouvrement sédiment" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1004 #"Type.Sediment", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1005 "X..Roche.Nue", # is NA, then replace by 0 as well because no sense to have a NA value for "% roche nue" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1006 "Nb.Littorina.obtusata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1007 "Nb.Gibbula.cineraria", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1008 "Nb.Gibbula.pennanti", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1009 "Nb.Gibbula.umbilicalis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1010 "Nb.Phallusia.mamillata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1011 "Nb.Tethya.aurantium", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1012 #"Nb.Spirobranchus.lamarckii.1B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1013 #"Nb.Spirobranchus.lamarckii.2B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1014 #"Nb.Spirobranchus.lamarckii.3B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1015 #"Nb.Spirobranchus.lamarckii.4B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1016 #"Nb.Spirobranchus.lamarckii.5B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1017 "Nb.Spirobranchus.lamarckii.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1018 #"Nb.spirorbis.1A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1019 #"Nb.spirorbis.2A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1020 #"Nb.spirorbis.3A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1021 #"Nb.spirorbis.4A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1022 #"Nb.spirorbis.5A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1023 "Nb.spirorbis.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1024 "Nb.Crassostrea.gigas", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1025 "Nb.Ostrea.edulis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1026 "X..Mytilus.sp.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1027 "X..Hermelles", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1028 "X..Hydraires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1029 "X..Eponges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1030 "X..Ascidies.Coloniales", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1031 "X..Ascidies.Solitaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1032 "X..Bryozoaires.Dresses", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1033 "X..Balanes.Vivantes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1034 #"Commentaires.Avant", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1035 "X..Surface.Accolement"#, # is NA, then replace by 0 as well because no sense to have a NA value for "% surface accolement" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1036 #"Type.sustrat.observé", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1037 #"Commentaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1038 #."Nb.Cancer.pagurus..Tourteau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1039 #.."Nb.Necora.puber..Etrille.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1040 #."Nb.Carcinus.maenas..Crabe.vert.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1041 #."Nb.Nucella.lapilus..Pourpre.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1042 #.."Nb.Eriphia.verrucosa..Crabe.verruqueux.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1043 #.."Nb.Octopus.vulgaris..Poulpe.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1044 #."Nb.Galathea..Galathées.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1045 #.."Nb.Paracentrotus.lividus..Oursin.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1046 #."Nb.Lophozozymus.incisus..ancien.Xantho.incisus.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1047 #."Nb.Palaemon.sp..Crevette.bouquet.ou.crevette.rose.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1048 #."Nb.Haliotis.tuberculata..Ormeau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1049 #."Nb.Stramonita.haemastoma..Pourpre.bouche.de.sang.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1050 #."Nb.Littorina.littorea..Bigorneau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1051 #."Nb.Xantho.pilipes..Xanthe.poilu.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1052 #."Nb.Mimachlamys.varia..Pétoncle.noir." |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1053 ) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1054 ] <- lapply(egmp_basq_bf[, c( |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1055 "X..algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1056 "Strate.algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1057 "X..algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1058 "Strate.algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1059 "X..algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1060 "Strate.algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1061 "X..Cladophora", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1062 "X..Lithophyllum", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1063 "X..Recouvrement.Sediment", # is NA, then replace by 0 as well because no sense to have a NA value for "% recouvrement sédiment" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1064 #"Type.Sediment", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1065 "X..Roche.Nue", # is NA, then replace by 0 as well because no sense to have a NA value for "% roche nue" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1066 "Nb.Littorina.obtusata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1067 "Nb.Gibbula.cineraria", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1068 "Nb.Gibbula.pennanti", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1069 "Nb.Gibbula.umbilicalis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1070 "Nb.Phallusia.mamillata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1071 "Nb.Tethya.aurantium", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1072 #"Nb.Spirobranchus.lamarckii.1B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1073 #"Nb.Spirobranchus.lamarckii.2B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1074 #"Nb.Spirobranchus.lamarckii.3B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1075 #"Nb.Spirobranchus.lamarckii.4B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1076 #"Nb.Spirobranchus.lamarckii.5B", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1077 "Nb.Spirobranchus.lamarckii.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1078 #"Nb.spirorbis.1A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1079 #"Nb.spirorbis.2A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1080 #"Nb.spirorbis.3A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1081 #"Nb.spirorbis.4A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1082 #"Nb.spirorbis.5A", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1083 "Nb.spirorbis.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1084 "Nb.Crassostrea.gigas", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1085 "Nb.Ostrea.edulis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1086 "X..Mytilus.sp.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1087 "X..Hermelles", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1088 "X..Hydraires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1089 "X..Eponges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1090 "X..Ascidies.Coloniales", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1091 "X..Ascidies.Solitaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1092 "X..Bryozoaires.Dresses", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1093 "X..Balanes.Vivantes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1094 #"Commentaires.Avant", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1095 "X..Surface.Accolement"#, # is NA, then replace by 0 as well because no sense to have a NA value for "% surface accolement" as well. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1096 #"Type.sustrat.observé", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1097 #"Commentaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1098 #."Nb.Cancer.pagurus..Tourteau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1099 #.."Nb.Necora.puber..Etrille.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1100 #."Nb.Carcinus.maenas..Crabe.vert.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1101 #."Nb.Nucella.lapilus..Pourpre.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1102 #.."Nb.Eriphia.verrucosa..Crabe.verruqueux.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1103 #.."Nb.Octopus.vulgaris..Poulpe.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1104 #."Nb.Galathea..Galathées.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1105 #.."Nb.Paracentrotus.lividus..Oursin.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1106 #."Nb.Lophozozymus.incisus..ancien.Xantho.incisus.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1107 #."Nb.Palaemon.sp..Crevette.bouquet.ou.crevette.rose.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1108 #."Nb.Haliotis.tuberculata..Ormeau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1109 #."Nb.Stramonita.haemastoma..Pourpre.bouche.de.sang.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1110 #."Nb.Littorina.littorea..Bigorneau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1111 #."Nb.Xantho.pilipes..Xanthe.poilu.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1112 #."Nb.Mimachlamys.varia..Pétoncle.noir." |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1113 ) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1114 ], function(x) replace(x, is.na(x), 0)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1115 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1116 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1117 # merge dfs. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1118 qecbnato0 <- dplyr::bind_rows(bretagne_bm, bretagne_bf) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1119 qecbnato0 <- dplyr::bind_rows(qecbnato0, egmp_basq_bm) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1120 qecbnato0 <- dplyr::bind_rows(qecbnato0, egmp_basq_bf) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1121 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1122 qecbnato0 <- dplyr::arrange(qecbnato0, region, site_year_month_day, Type.Bloc, Numéro.Bloc.échantillon, Face) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1123 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1124 rm(bretagne_bm, bretagne_bf, egmp_basq_bm, egmp_basq_bf) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1125 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1126 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1127 ## analyse matricielle |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1128 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1129 # NB some variables were dplyr::renamed or created, cfr I originally merged qecb and ivr data in below script to do some correlation analysis. This is not the case anymore, so no more merging anymore. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1130 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1131 qecbnato0 <- tibble::add_column(qecbnato0, region.site_year_month_day = paste0(qecbnato0$region, qecbnato0$site_year_month_day), .before = "region") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1132 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1133 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1134 numero_quadrat <- stringr::str_sub(qecbnato0$quadrat_bis, start = -1) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1135 qecbnato0 <- tibble::add_column(qecbnato0, numero_quadrat, .after = "quadrat_bis") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1136 rm(numero_quadrat) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1137 qecbnato0$numero_quadrat <- as.integer(qecbnato0$numero_quadrat) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1138 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1139 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1140 qecbnato0$Year <- as.integer(qecbnato0$Year) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1141 qecbnato0$Month <- as.integer(qecbnato0$Month) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1142 qecbnato0$Day <- as.integer(qecbnato0$Day) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1143 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1144 ############################################################ |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1145 #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1146 # Anna still hasn't corrected for boulder nb in FINS_Quemenes.2020.10.16 data encoding ! removed from the df_ |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1147 qecbnato0 <- qecbnato0 %>% dplyr::filter(site_year_month_day != "FINS_Quemenes.2020.10.16") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1148 ############################################################ |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1149 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1150 # what to do with spirorbes & Nb.Spirobranchus.lamarckii.total? log10 transformation |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1151 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1152 qecbnato0 <- tibble::add_column(qecbnato0, log10.Nb.spirorbis.total = log10(qecbnato0$Nb.spirorbis.total + 1), .after = "Nb.spirorbis.total") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1153 qecbnato0 <- tibble::add_column(qecbnato0, log10.Nb.Spirobranchus.lamarckii.total = log10(qecbnato0$Nb.Spirobranchus.lamarckii.total + 1), .after = "Nb.Spirobranchus.lamarckii.total") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1154 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1155 saveRDS(qecbnato0, "qecbnato0.RDS") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1156 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1157 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1158 ############################################################### |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1159 # # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1160 # Start dissimilarity calculation with some data handling # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1161 # # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1162 ############################################################### |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1163 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1164 # first, create vector (4) for qecb and fishing by region (same as above) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1165 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1166 bret_egmp_basq_qecb <- c( |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1167 "X..algues.brunes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1168 "X..algues.rouges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1169 "X..algues.vertes", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1170 "X..Cladophora", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1171 "X..Lithophyllum", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1172 "Nb.Littorina.obtusata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1173 "Nb.Gibbula.cineraria", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1174 "Nb.Gibbula.pennanti", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1175 "Nb.Gibbula.umbilicalis", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1176 "Nb.Phallusia.mamillata", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1177 "Nb.Tethya.aurantium", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1178 "Nb.Spirobranchus.lamarckii.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1179 "Nb.spirorbis.total", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1180 "X..Eponges", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1181 "X..Ascidies.Coloniales", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1182 "X..Ascidies.Solitaires", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1183 "X..Bryozoaires.Dresses", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1184 "X..Balanes.Vivantes" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1185 #, "X..Recouvrement.Sediment" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1186 #, "X..Roche.Nue" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1187 #, "X..Surface.Accolement" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1188 ) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1189 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1190 egmp_basq_qecb <- c("Nb.Crassostrea.gigas", "Nb.Ostrea.edulis", "X..Mytilus.sp.", "X..Hermelles", "X..Hydraires") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1191 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1192 bret_egmp_basq_fishing <- c("Nb.Cancer.pagurus..Tourteau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1193 "Nb.Necora.puber..Etrille.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1194 "Nb.Carcinus.maenas..Crabe.vert.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1195 "Nb.Nucella.lapilus..Pourpre.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1196 "Nb.Galathea..Galathées.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1197 "Nb.Lophozozymus.incisus..ancien.Xantho.incisus.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1198 "Nb.Palaemon.sp..Crevette.bouquet.ou.crevette.rose.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1199 "Nb.Haliotis.tuberculata..Ormeau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1200 "Nb.Littorina.littorea..Bigorneau.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1201 "Nb.Xantho.pilipes..Xanthe.poilu.", |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1202 "Nb.Mimachlamys.varia..Pétoncle.noir.") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1203 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1204 egmp_basq_fishing <- c("Nb.Eriphia.verrucosa..Crabe.verruqueux.", "Nb.Octopus.vulgaris..Poulpe.", "Nb.Paracentrotus.lividus..Oursin.", "Nb.Stramonita.haemastoma..Pourpre.bouche.de.sang.") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1205 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1206 # here I can choose to either replace spirorbis and/or spirobranchus by their log10 transformation in bret_egmp_basq_qecb vector |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1207 bret_egmp_basq_qecb <- replace(bret_egmp_basq_qecb, bret_egmp_basq_qecb == "Nb.spirorbis.total", "log10.Nb.spirorbis.total") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1208 saveRDS(bret_egmp_basq_qecb, "bret_egmp_basq_qecb.RDS") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1209 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1210 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1211 ############################################################# |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1212 # # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1213 # Compute dissimilarity # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1214 # # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1215 ############################################################# |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1216 ### determination of coefficient of dissimilarity face sup mobile bloc vs fixed bloc |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1217 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1218 # loop in a fct |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1219 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1220 matri_fct_bmf <- function(data, conca) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1221 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1222 matri_df <- data |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1223 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1224 for (x in c(1:length(unique(matri_df$site_year_month_day)))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1225 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1226 qecbnato0_x <- matri_df %>% dplyr::filter(site_year_month_day == unique(matri_df$site_year_month_day)[[x]]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1227 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1228 rownames(qecbnato0_x) <- paste0(qecbnato0_x$Type.Bloc, "_", qecbnato0_x$Face, "_", qecbnato0_x$Numéro.Bloc.échantillon, "_", qecbnato0_x$quadrat_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1229 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1230 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1231 mtxdis <- vegan::vegdist( |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1232 sqrt(qecbnato0_x[, conca]), #Transform your species abundance data_ Typically, raw abundances are transformed prior to analysis. Usually you will use square root, fourth-root, log(X+1), or presence-absence (square root being least extreme, P/A being most). I would start with square root. (https://stats.stackexchange.com/questions/234495/double-zeroes-problem-with-euclidean-distance-and-abundance-data-is-the-proble) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1233 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1234 na.rm = TRUE, |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1235 method = "bray" #Construct species abundance dissimilarity matrices with Bray-Curtis. If your data contains samples that are all-zero you will run into the double zero problem. This can be overcome by using a zero-adjusted Bray-Curtis coefficient, which is sometimes referred to as a 'dummy variable' which damps down the similarity fluctuations between samples that are both zero (undefined). => see below for zero-adjusted Bray-Curtis coefficient ; #another possibility, sqrt + 1 ?? |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1236 ) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1237 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1238 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1239 #https://rdrr.io/github/phytomosaic/ecole/man/bray0.html |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1240 # mtxdis <- ecole::bray0( |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1241 # sqrt |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1242 # (qecbnato0_x[,conca]), na.rm = TRUE) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1243 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1244 expand.grid(mtxdis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1245 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1246 mtxdisdf_ <- as.data.frame(as.matrix(mtxdis)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1247 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1248 a_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1249 b_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1250 c_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1251 d_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1252 e_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1253 f_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1254 g_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1255 h_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1256 i_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1257 j_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1258 k_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1259 l_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1260 m_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1261 n_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1262 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1263 for (z in c(1:nrow(mtxdisdf_))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1264 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1265 a_[[z]] <- (paste0(rownames(mtxdisdf_[z + 1, ]), " & ", ifelse(nrow(mtxdisdf_) >= 1, colnames(mtxdisdf_[1]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1266 b_[[z]] <- (paste0(rownames(mtxdisdf_[z + 2, ]), " & ", ifelse(nrow(mtxdisdf_) >= 2, colnames(mtxdisdf_[2]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1267 c_[[z]] <- (paste0(rownames(mtxdisdf_[z + 3, ]), " & ", ifelse(nrow(mtxdisdf_) >= 3, colnames(mtxdisdf_[3]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1268 d_[[z]] <- (paste0(rownames(mtxdisdf_[z + 4, ]), " & ", ifelse(nrow(mtxdisdf_) >= 4, colnames(mtxdisdf_[4]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1269 e_[[z]] <- (paste0(rownames(mtxdisdf_[z + 5, ]), " & ", ifelse(nrow(mtxdisdf_) >= 5, colnames(mtxdisdf_[5]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1270 f_[[z]] <- (paste0(rownames(mtxdisdf_[z + 6, ]), " & ", ifelse(nrow(mtxdisdf_) >= 6, colnames(mtxdisdf_[6]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1271 g_[[z]] <- (paste0(rownames(mtxdisdf_[z + 7, ]), " & ", ifelse(nrow(mtxdisdf_) >= 7, colnames(mtxdisdf_[7]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1272 h_[[z]] <- (paste0(rownames(mtxdisdf_[z + 8, ]), " & ", ifelse(nrow(mtxdisdf_) >= 8, colnames(mtxdisdf_[8]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1273 i_[[z]] <- (paste0(rownames(mtxdisdf_[z + 9, ]), " & ", ifelse(nrow(mtxdisdf_) >= 9, colnames(mtxdisdf_[9]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1274 j_[[z]] <- (paste0(rownames(mtxdisdf_[z + 10, ]), " & ", ifelse(nrow(mtxdisdf_) >= 10, colnames(mtxdisdf_[10]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1275 k_[[z]] <- (paste0(rownames(mtxdisdf_[z + 11, ]), " & ", ifelse(nrow(mtxdisdf_) >= 11, colnames(mtxdisdf_[11]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1276 l_[[z]] <- (paste0(rownames(mtxdisdf_[z + 12, ]), " & ", ifelse(nrow(mtxdisdf_) >= 12, colnames(mtxdisdf_[12]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1277 m_[[z]] <- (paste0(rownames(mtxdisdf_[z + 13, ]), " & ", ifelse(nrow(mtxdisdf_) >= 13, colnames(mtxdisdf_[13]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1278 n_[[z]] <- (paste0(rownames(mtxdisdf_[z + 14, ]), " & ", ifelse(nrow(mtxdisdf_) >= 14, colnames(mtxdisdf_[14]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1279 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1280 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1281 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1282 rm(z) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1283 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1284 y <- length(a_) - (ifelse(nrow(mtxdisdf_) >= 1, 1, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1285 a_ <- a_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1286 y <- length(b_) - (ifelse(nrow(mtxdisdf_) >= 2, 2, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1287 b_ <- b_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1288 y <- length(c_) - (ifelse(nrow(mtxdisdf_) >= 3, 3, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1289 c_ <- c_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1290 y <- length(d_) - (ifelse(nrow(mtxdisdf_) >= 4, 4, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1291 d_ <- d_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1292 y <- length(e_) - (ifelse(nrow(mtxdisdf_) >= 5, 5, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1293 e_ <- e_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1294 y <- length(f_) - (ifelse(nrow(mtxdisdf_) >= 6, 6, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1295 f_ <- f_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1296 y <- length(g_) - (ifelse(nrow(mtxdisdf_) >= 7, 7, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1297 g_ <- g_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1298 y <- length(h_) - (ifelse(nrow(mtxdisdf_) >= 8, 8, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1299 h_ <- h_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1300 y <- length(i_) - (ifelse(nrow(mtxdisdf_) >= 9, 9, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1301 i_ <- i_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1302 y <- length(j_) - (ifelse(nrow(mtxdisdf_) >= 10, 10, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1303 j_ <- j_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1304 y <- length(k_) - (ifelse(nrow(mtxdisdf_) >= 11, 11, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1305 k_ <- k_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1306 y <- length(l_) - (ifelse(nrow(mtxdisdf_) >= 12, 12, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1307 l_ <- l_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1308 y <- length(m_) - (ifelse(nrow(mtxdisdf_) >= 13, 13, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1309 m_ <- m_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1310 y <- length(n_) - (ifelse(nrow(mtxdisdf_) >= 14, 14, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1311 n_ <- n_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1312 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1313 rm(y) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1314 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1315 name_ <- c(a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1316 df_ <- data.frame(expand.grid(mtxdis), name_[1:nrow(expand.grid(mtxdis))]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1317 names(df_) <- c("dist.", "name_") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1318 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1319 rm(a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1320 rm(name_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1321 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1322 q_ <- strsplit(df_$name_, " & ") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1323 mat_ <- matrix(unlist(q_), ncol = 2, byrow = TRUE) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1324 q_df_ <- as.data.frame(matrix(unlist(q_), ncol = 2, byrow = TRUE)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1325 df_ <- dplyr::bind_cols(df_, q_df_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1326 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1327 rm(q_, mat_, q_df_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1328 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1329 split_ <- strsplit(df_$V1, "_") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1330 v1_split_ <- as.data.frame(matrix(unlist(split_), ncol = 4, byrow = TRUE)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1331 split_ <- strsplit(df_$V2, "_") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1332 v2_split_ <- as.data.frame(matrix(unlist(split_), ncol = 4, byrow = TRUE)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1333 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1334 df_ <- dplyr::bind_cols(df_, v1_split_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1335 df_ <- dplyr::bind_cols(df_, v2_split_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1336 df_red_ <- subset(df_, V4...8 == V4...12 & V1...5 != V1...9) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1337 site_year_month_day <- rep(unique(qecbnato0_x$site_year_month_day), nrow(df_red_)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1338 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1339 df_red_ <- tibble::add_column(df_red_, site_year_month_day, .before = "dist.") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1340 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1341 rm(split_, v1_split_, v2_split_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1342 rm(mtxdis, mtxdisdf_, df_, site_year_month_day) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1343 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1344 matri_list[[x]] <- df_red_ |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1345 matri_list <<- matri_list |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1346 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1347 rm(df_red_, qecbnato0_x, x) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1348 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1349 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1350 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1351 matri_df <- do.call("rbind", matri_list) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1352 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1353 names(matri_df) <- c("site_year_month_day", "dist.", "name_", "name_left", "name_right", "Type.Bloc.left", "Face.left", "Numéro.Bloc.échantillon.left", "Quadrat.left", "Type.Bloc.right", "Face.right", "Numéro.Bloc.échantillon.right", "Quadrat.right") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1354 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1355 matri_df <<- matri_df |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1356 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1357 hist(matri_df$dist.) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1358 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1359 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1360 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1361 data_ <- dplyr::filter(qecbnato0, Face == "face supérieure") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1362 data_$Type.Bloc <- ifelse(as.character(data_$Type.Bloc) == "Roche en place", "Bloc fixé", as.character(data_$Type.Bloc)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1363 matri_list <- vector("list", length(unique(data_$site_year_month_day))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1364 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1365 matri_fct_bmf(data = data_, conca = c(bret_egmp_basq_qecb, egmp_basq_qecb)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1366 hist(matri_df$dist., main = c(paste("Histo. of Bray (0-adjusted) dist. dissimilarity measures"), paste(" (sqrt transfo) - BMfs vs BF -"))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1367 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1368 matri_full_bm_bf_fs <- matri_df |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1369 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1370 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1371 rm(data_, matri_df, matri_list) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1372 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1373 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1374 ### determination of coefficient of dissimilarity between blocs mobiles face sup vs face inf. |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1375 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1376 # loop in a fct |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1377 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1378 matri_fct_bmm <- function(data, conca) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1379 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1380 matri_df <- data |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1381 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1382 for (x in c(1:length(unique(matri_df$site_year_month_day)))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1383 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1384 qecbnato0_x <- matri_df %>% dplyr::filter(site_year_month_day == unique(matri_df$site_year_month_day)[[x]]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1385 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1386 rownames(qecbnato0_x) <- paste0(qecbnato0_x$Type.Bloc, "_", qecbnato0_x$Face, "_", qecbnato0_x$Numéro.Bloc.échantillon, "_", qecbnato0_x$quadrat_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1387 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1388 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1389 mtxdis <- vegan::vegdist( |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1390 sqrt(qecbnato0_x[, c(bret_egmp_basq_qecb)]), #Transform your species abundance data_ Typically, raw abundances are transformed prior to analysis. Usually you will use square root, fourth-root, log(X+1), or presence-absence (square root being least extreme, P/A being most). I would start with square root. (https://stats.stackexchange.com/questions/234495/double-zeroes-problem-with-euclidean-distance-and-abundance-data-is-the-proble) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1391 na.rm = TRUE, |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1392 method = "bray" #Construct species abundance dissimilarity matrices with Bray-Curtis. If your data contains samples that are all-zero you will run into the double zero problem. This can be overcome by using a zero-adjusted Bray-Curtis coefficient, which is sometimes referred to as a 'dummy variable' which damps down the similarity fluctuations between samples that are both zero (undefined). => see below for zero-adjusted Bray-Curtis coefficient ; #another possibility, sqrt + 1 ?? |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1393 ) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1394 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1395 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1396 #mtxdis <- ecole::bray0( |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1397 # sqrt(qecbnato0_x[, conca]), na.rm = TRUE) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1398 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1399 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1400 expand.grid(mtxdis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1401 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1402 mtxdisdf_ <- as.data.frame(as.matrix(mtxdis)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1403 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1404 a_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1405 b_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1406 c_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1407 d_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1408 e_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1409 f_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1410 g_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1411 h_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1412 i_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1413 j_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1414 k_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1415 l_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1416 m_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1417 n_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1418 o_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1419 p_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1420 q_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1421 r_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1422 s_ <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1423 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1424 for (z in c(1:nrow(mtxdisdf_))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1425 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1426 a_[[z]] <- (paste0(rownames(mtxdisdf_[z + 1, ]), " & ", ifelse(nrow(mtxdisdf_) >= 1, colnames(mtxdisdf_[1]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1427 b_[[z]] <- (paste0(rownames(mtxdisdf_[z + 2, ]), " & ", ifelse(nrow(mtxdisdf_) >= 2, colnames(mtxdisdf_[2]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1428 c_[[z]] <- (paste0(rownames(mtxdisdf_[z + 3, ]), " & ", ifelse(nrow(mtxdisdf_) >= 3, colnames(mtxdisdf_[3]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1429 d_[[z]] <- (paste0(rownames(mtxdisdf_[z + 4, ]), " & ", ifelse(nrow(mtxdisdf_) >= 4, colnames(mtxdisdf_[4]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1430 e_[[z]] <- (paste0(rownames(mtxdisdf_[z + 5, ]), " & ", ifelse(nrow(mtxdisdf_) >= 5, colnames(mtxdisdf_[5]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1431 f_[[z]] <- (paste0(rownames(mtxdisdf_[z + 6, ]), " & ", ifelse(nrow(mtxdisdf_) >= 6, colnames(mtxdisdf_[6]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1432 g_[[z]] <- (paste0(rownames(mtxdisdf_[z + 7, ]), " & ", ifelse(nrow(mtxdisdf_) >= 7, colnames(mtxdisdf_[7]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1433 h_[[z]] <- (paste0(rownames(mtxdisdf_[z + 8, ]), " & ", ifelse(nrow(mtxdisdf_) >= 8, colnames(mtxdisdf_[8]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1434 i_[[z]] <- (paste0(rownames(mtxdisdf_[z + 9, ]), " & ", ifelse(nrow(mtxdisdf_) >= 9, colnames(mtxdisdf_[9]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1435 j_[[z]] <- (paste0(rownames(mtxdisdf_[z + 10, ]), " & ", ifelse(nrow(mtxdisdf_) >= 10, colnames(mtxdisdf_[10]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1436 k_[[z]] <- (paste0(rownames(mtxdisdf_[z + 11, ]), " & ", ifelse(nrow(mtxdisdf_) >= 11, colnames(mtxdisdf_[11]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1437 l_[[z]] <- (paste0(rownames(mtxdisdf_[z + 12, ]), " & ", ifelse(nrow(mtxdisdf_) >= 12, colnames(mtxdisdf_[12]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1438 m_[[z]] <- (paste0(rownames(mtxdisdf_[z + 13, ]), " & ", ifelse(nrow(mtxdisdf_) >= 13, colnames(mtxdisdf_[13]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1439 n_[[z]] <- (paste0(rownames(mtxdisdf_[z + 14, ]), " & ", ifelse(nrow(mtxdisdf_) >= 14, colnames(mtxdisdf_[14]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1440 o_[[z]] <- (paste0(rownames(mtxdisdf_[z + 15, ]), " & ", ifelse(nrow(mtxdisdf_) >= 15, colnames(mtxdisdf_[15]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1441 p_[[z]] <- (paste0(rownames(mtxdisdf_[z + 16, ]), " & ", ifelse(nrow(mtxdisdf_) >= 16, colnames(mtxdisdf_[16]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1442 q_[[z]] <- (paste0(rownames(mtxdisdf_[z + 17, ]), " & ", ifelse(nrow(mtxdisdf_) >= 17, colnames(mtxdisdf_[17]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1443 r_[[z]] <- (paste0(rownames(mtxdisdf_[z + 18, ]), " & ", ifelse(nrow(mtxdisdf_) >= 18, colnames(mtxdisdf_[18]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1444 s_[[z]] <- (paste0(rownames(mtxdisdf_[z + 19, ]), " & ", ifelse(nrow(mtxdisdf_) >= 19, colnames(mtxdisdf_[19]), NA))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1445 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1446 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1447 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1448 rm(z) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1449 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1450 y <- length(a_) - (ifelse(nrow(mtxdisdf_) >= 1, 1, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1451 a_ <- a_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1452 y <- length(b_) - (ifelse(nrow(mtxdisdf_) >= 2, 2, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1453 b_ <- b_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1454 y <- length(c_) - (ifelse(nrow(mtxdisdf_) >= 3, 3, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1455 c_ <- c_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1456 y <- length(d_) - (ifelse(nrow(mtxdisdf_) >= 4, 4, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1457 d_ <- d_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1458 y <- length(e_) - (ifelse(nrow(mtxdisdf_) >= 5, 5, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1459 e_ <- e_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1460 y <- length(f_) - (ifelse(nrow(mtxdisdf_) >= 6, 6, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1461 f_ <- f_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1462 y <- length(g_) - (ifelse(nrow(mtxdisdf_) >= 7, 7, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1463 g_ <- g_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1464 y <- length(h_) - (ifelse(nrow(mtxdisdf_) >= 8, 8, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1465 h_ <- h_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1466 y <- length(i_) - (ifelse(nrow(mtxdisdf_) >= 9, 9, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1467 i_ <- i_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1468 y <- length(j_) - (ifelse(nrow(mtxdisdf_) >= 10, 10, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1469 j_ <- j_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1470 y <- length(k_) - (ifelse(nrow(mtxdisdf_) >= 11, 11, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1471 k_ <- k_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1472 y <- length(l_) - (ifelse(nrow(mtxdisdf_) >= 12, 12, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1473 l_ <- l_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1474 y <- length(m_) - (ifelse(nrow(mtxdisdf_) >= 13, 13, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1475 m_ <- m_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1476 y <- length(n_) - (ifelse(nrow(mtxdisdf_) >= 14, 14, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1477 n_ <- n_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1478 y <- length(o_) - (ifelse(nrow(mtxdisdf_) >= 15, 15, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1479 o_ <- o_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1480 y <- length(p_) - (ifelse(nrow(mtxdisdf_) >= 16, 16, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1481 p_ <- p_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1482 y <- length(q_) - (ifelse(nrow(mtxdisdf_) >= 17, 17, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1483 q_ <- q_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1484 y <- length(r_) - (ifelse(nrow(mtxdisdf_) >= 18, 18, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1485 r_ <- r_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1486 y <- length(s_) - (ifelse(nrow(mtxdisdf_) >= 19, 19, nrow(mtxdisdf_))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1487 s_ <- s_[1:y] |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1488 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1489 rm(y) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1490 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1491 name_ <- c(a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, o_, p_, q_, r_, s_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1492 df_ <- data.frame(expand.grid(mtxdis), name_[1:seq_len(nrow(expand.grid(mtxdis)))]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1493 names(df_) <- c("dist.", "name_") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1494 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1495 rm(a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, o_, p_, q_, r_, s_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1496 rm(name_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1497 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1498 q_ <- strsplit(df_$name_, " & ") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1499 mat_ <- matrix(unlist(q_), ncol = 2, byrow = TRUE) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1500 q_df_ <- as.data.frame(matrix(unlist(q_), ncol = 2, byrow = TRUE)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1501 df_ <- dplyr::bind_cols(df_, q_df_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1502 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1503 rm(q_, mat_, q_df_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1504 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1505 split_ <- strsplit(df_$V1, "_") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1506 v1_split_ <- as.data.frame(matrix(unlist(split_), ncol = 4, byrow = TRUE)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1507 split_ <- strsplit(df_$V2, "_") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1508 v2_split_ <- as.data.frame(matrix(unlist(split_), ncol = 4, byrow = TRUE)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1509 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1510 df_ <- dplyr::bind_cols(df_, v1_split_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1511 df_ <- dplyr::bind_cols(df_, v2_split_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1512 df_red_ <- subset(df_, V4...8 == V4...12 & V3...7 == V3...11) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1513 site_year_month_day <- rep(unique(qecbnato0_x$site_year_month_day), nrow(df_red_)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1514 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1515 df_red_ <- tibble::add_column(df_red_, site_year_month_day, .before = "dist.") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1516 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1517 rm(split_, v1_split_, v2_split_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1518 rm(mtxdis, mtxdisdf_, df_, site_year_month_day) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1519 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1520 matri_list[[x]] <- df_red_ |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1521 matri_list <<- matri_list |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1522 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1523 rm(df_red_, qecbnato0_x, x) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1524 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1525 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1526 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1527 matri_df <- do.call("rbind", matri_list) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1528 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1529 names(matri_df) <- c("site_year_month_day", "dist.", "name_", "name_left", "name_right", "Type.Bloc.left", "Face.left", "Numéro.Bloc.échantillon.left", "Quadrat.left", "Type.Bloc.right", "Face.right", "Numéro.Bloc.échantillon.right", "Quadrat.right") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1530 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1531 matri_df <<- matri_df |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1532 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1533 hist(matri_df$dist.) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1534 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1535 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1536 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1537 data_ <- dplyr::filter(qecbnato0, Type.Bloc == "Bloc mobile") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1538 matri_list <- vector("list", length(unique(data_$site_year_month_day))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1539 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1540 matri_fct_bmm(data = data_, conca = c(bret_egmp_basq_qecb, egmp_basq_qecb)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1541 hist(matri_df$dist., main = c(paste("Histo. of Bray (0-adjusted) dist. dissimilarity measures"), paste(" (sqrt transfo) - BMfs vs BMfi -"))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1542 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1543 matri_full_bm_bf_fi <- matri_df |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1544 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1545 rm(data_, matri_df, matri_list) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1546 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1547 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1548 ############################################################# |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1549 # # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1550 # Plot dissimilarity # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1551 # # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1552 ############################################################# |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1553 ## plot |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1554 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1555 # activate line |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1556 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1557 matri_full_bm_bf_fs <- tidyr::separate(matri_full_bm_bf_fs, "site_year_month_day", into = c("departement", "Site", "Year", "Month", "Day"), remove = FALSE) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1558 matri_full_bm_bf_fs$Site <- paste0(matri_full_bm_bf_fs$departement, "_", matri_full_bm_bf_fs$Site) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1559 matri_full_bm_bf_fs <- subset(matri_full_bm_bf_fs, select = - c(departement)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1560 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1561 matri_full_bm_bf_fs <- tibble::add_column(matri_full_bm_bf_fs, Date = as.Date(paste0(matri_full_bm_bf_fs$Year, "-", matri_full_bm_bf_fs$Month, "-", matri_full_bm_bf_fs$Day), origin = "1970-01-01"), .after = "Site") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1562 matri_full_bm_bf_fs$Site <- as.factor(matri_full_bm_bf_fs$Site) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1563 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1564 matri_full_bm_bf_fi <- tidyr::separate(matri_full_bm_bf_fi, "site_year_month_day", into = c("departement", "Site", "Year", "Month", "Day"), remove = FALSE) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1565 matri_full_bm_bf_fi$Site <- paste0(matri_full_bm_bf_fi$departement, "_", matri_full_bm_bf_fi$Site) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1566 matri_full_bm_bf_fi <- subset(matri_full_bm_bf_fi, select = - c(departement)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1567 matri_full_bm_bf_fi <- tibble::add_column(matri_full_bm_bf_fi, Date = as.Date(paste0(matri_full_bm_bf_fi$Year, "-", matri_full_bm_bf_fi$Month, "-", matri_full_bm_bf_fi$Day), origin = "1970-01-01"), .after = "Site") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1568 matri_full_bm_bf_fi$Site <- as.factor(matri_full_bm_bf_fi$Site) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1569 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1570 # if error message "Error in .Call.graphics(C_palette2, .Call(C_palette2, NULL)) : invalid graphics state" |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1571 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1572 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1573 bf_fs_plot <- ggplot2::ggplot(matri_full_bm_bf_fs, ggplot2::aes(x = Site, y = dist.)) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1574 ggplot2::geom_boxplot() + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1575 #geom_jitter(shape = 16, position=position_jitter(0.2)) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1576 ggplot2::xlab("") + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1577 ggplot2::ylab("distance diss. BM.BF_FS") + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1578 ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 90, vjust = 0.5, hjust = 1)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1579 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1580 ggplot2::ggsave("distance_diss_BF_FS.png", bf_fs_plot, height = 4.5, width = 4) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1581 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1582 fs_fi_plot <- ggplot2::ggplot(matri_full_bm_bf_fi, ggplot2::aes(x = Site, y = dist.)) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1583 ggplot2::geom_boxplot() + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1584 #geom_jitter(shape = 16, position=position_jitter(0.2)) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1585 ggplot2::xlab("") + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1586 ggplot2::ylab("distance diss. BM_FS.FI") + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1587 ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 90, vjust = 0.5, hjust = 1)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1588 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1589 ggplot2::ggsave("distance_diss_FS_FI.png", fs_fi_plot, height = 4.5, width = 4) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1590 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1591 # issue with type de bloc, numéro de bloc and quadrat for df_ BM.BF_FS, cfr df_ left vs right variables doesn't give the right combination (variables with left vs right label in names come from the dissimilarity coefficient functions). |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1592 matri_full_bm_bf_fs$Quadrat <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1593 for (i in c(1:seq_len(nrow(matri_full_bm_bf_fs)))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1594 ifelse(matri_full_bm_bf_fs$Type.Bloc.left[i] == "Bloc mobile", matri_full_bm_bf_fs$Quadrat[i] <- matri_full_bm_bf_fs$Quadrat.left[i], matri_full_bm_bf_fs$Quadrat[i] <- matri_full_bm_bf_fs$Quadrat.right[i]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1595 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1596 matri_full_bm_bf_fs$Numéro.Bloc <- NA |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1597 for (i in c(1:seq_len(nrow(matri_full_bm_bf_fs)))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1598 ifelse(matri_full_bm_bf_fs$Type.Bloc.left[i] == "Bloc mobile", matri_full_bm_bf_fs$Numéro.Bloc[i] <- matri_full_bm_bf_fs$Numéro.Bloc.échantillon.left[i], matri_full_bm_bf_fs$Numéro.Bloc[i] <- matri_full_bm_bf_fs$Numéro.Bloc.échantillon.right[i]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1599 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1600 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1601 matri_full_bm_bf_fs <- tibble::add_column(matri_full_bm_bf_fs, site_year_month_day.q_BMnb = paste0(matri_full_bm_bf_fs$site_year_month_day, "_", matri_full_bm_bf_fs$Quadrat, "_", matri_full_bm_bf_fs$Numéro.Bloc), .after = "site_year_month_day") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1602 matri_full_bm_bf_fi <- tibble::add_column(matri_full_bm_bf_fi, site_year_month_day.q_BMnb = paste0(matri_full_bm_bf_fi$site_year_month_day, "_", matri_full_bm_bf_fi$Quadrat.left, "_", matri_full_bm_bf_fi$Numéro.Bloc.échantillon.left), .after = "site_year_month_day") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1603 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1604 colnames(matri_full_bm_bf_fs) <- paste("BM.BF_FS", colnames(matri_full_bm_bf_fs), sep = "_") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1605 matri_full_bm_bf_fs <- dplyr::rename(matri_full_bm_bf_fs, site_year_month_day.q_BMnb = BM.BF_FS_site_year_month_day.q_BMnb) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1606 colnames(matri_full_bm_bf_fi) <- paste("BM_FS.FI", colnames(matri_full_bm_bf_fi), sep = "_") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1607 matri_full_bm_bf_fi <- dplyr::rename(matri_full_bm_bf_fi, site_year_month_day.q_BMnb = BM_FS.FI_site_year_month_day.q_BMnb) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1608 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1609 matri_full <- dplyr::full_join(matri_full_bm_bf_fs[, c("site_year_month_day.q_BMnb", "BM.BF_FS_dist.")], matri_full_bm_bf_fi[, c("site_year_month_day.q_BMnb", "BM_FS.FI_dist.")]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1610 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1611 matri_full <- tidyr::separate(matri_full, "site_year_month_day.q_BMnb", into = c("departement", "Site", "Year", "Month", "Day", "Quadrat", "Bloc Mobile Number"), remove = FALSE) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1612 matri_full$Site <- paste0(matri_full$departement, "_", matri_full$Site) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1613 matri_full <- subset(matri_full, select = - c(departement)) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1614 matri_full <- tibble::add_column(matri_full, Date = as.Date(paste0(matri_full$Year, "-", matri_full$Month, "-", matri_full$Day), origin = "1970-01-01"), .after = "Site") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1615 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1616 # Name for report/plot |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1617 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1618 matri_full <- tibble::add_column(matri_full, Site_bis = matri_full$Site, .after = "Site") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1619 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1620 matri_full$Site_bis <- ifelse(matri_full$Site == "GDMO_Locmariaquer", "Locmariaquer", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1621 matri_full$Site_bis <- ifelse(matri_full$Site == "GDMO_BegLann", "Beg Lann", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1622 matri_full$Site_bis <- ifelse(matri_full$Site == "FOUR_PlateauFour", "Plateau du Four", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1623 matri_full$Site_bis <- ifelse(matri_full$Site == "EGMP_GroinCou", "Groin du Cou", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1624 matri_full$Site_bis <- ifelse(matri_full$Site == "EGMP_PasEmsembert", "Le Pas d'Emsembert", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1625 matri_full$Site_bis <- ifelse(matri_full$Site == "EGMP_BreeBains", "La Brée-les-Bains", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1626 matri_full$Site_bis <- ifelse(matri_full$Site == "EGMP_PerreAntiochat", "Le Perré d'Antiochat", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1627 matri_full$Site_bis <- ifelse(matri_full$Site == "EGMP_Chassiron", "Chassiron", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1628 matri_full$Site_bis <- ifelse(matri_full$Site == "BASQ_FlotsBleusZP", "Les Flots Bleus / zone pêcheurs", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1629 matri_full$Site_bis <- ifelse(matri_full$Site == "BASQ_FlotsBleusZF", "Les Flots Bleus / zone familles", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1630 matri_full$Site_bis <- ifelse(matri_full$Site == "GONB_IlotStMichel", "Îlot Saint-Michel", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1631 matri_full$Site_bis <- ifelse(matri_full$Site == "FINS_Quemenes", "Quéménès", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1632 matri_full$Site_bis <- ifelse(matri_full$Site == "FINS_SeinGoulenez", "Île de Sein - Goulenez", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1633 matri_full$Site_bis <- ifelse(matri_full$Site == "FINS_SeinKilaourou", "Île de Sein - Kilaourou", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1634 matri_full$Site_bis <- ifelse(matri_full$Site == "ARMO_Verdelet", "Îlot du Verdelet", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1635 matri_full$Site_bis <- ifelse(matri_full$Site == "ARMO_Piegu", "Piégu", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1636 matri_full$Site_bis <- ifelse(matri_full$Site == "ARMO_Bilfot", "Pointe de Bilfot", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1637 matri_full$Site_bis <- ifelse(matri_full$Site == "ARMO_IlePlate", "Île Plate", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1638 matri_full$Site_bis <- ifelse(matri_full$Site == "PDMO_Perharidy", "Perharidy", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1639 matri_full$Site_bis <- ifelse(matri_full$Site == "BRES_Keraliou", "Keraliou", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1640 matri_full$Site_bis <- ifelse(matri_full$Site == "FINS_Mousterlin", "Pointe de Mousterlin", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1641 matri_full$Site_bis <- ifelse(matri_full$Site == "FINS_StNicolasGlenan", "Saint-Nicolas des Glénan", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1642 matri_full$Site_bis <- ifelse(matri_full$Site == "FINS_AnseRoz", "Pointe de l'Anse du Roz", matri_full$Site_bis) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1643 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1644 saveRDS(matri_full, "matri_full.RDS") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1645 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1646 ############################################################# |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1647 # # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1648 # Plot the dissimilarity per site # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1649 # # |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1650 ############################################################# |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1651 ## plot dissimilarity coefficient |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1652 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1653 matri_full$Year <- as.integer(matri_full$Year) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1654 matri_full$Month <- as.integer(matri_full$Month) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1655 matri_full$Day <- as.integer(matri_full$Day) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1656 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1657 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1658 ## BM_FS.FI_dist => mobile boulder upper vs lower faces |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1659 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1660 # Stats |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1661 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1662 bm_fs_fi_dist_stat <- matri_full %>% dplyr::group_by(Site, Site_bis, Date, Year, Month, Day) %>% dplyr::summarize(BM_FS.FI_dist.moy = mean(BM_FS.FI_dist., na.rm = TRUE), BM_FS.FI_dist.et = sd(BM_FS.FI_dist., na.rm = TRUE), BM_FS.FI_dist.med = median(BM_FS.FI_dist., na.rm = TRUE), BM_FS.FI_dist.min = min(BM_FS.FI_dist., na.rm = TRUE), BM_FS.FI_dist.max = max(BM_FS.FI_dist., na.rm = TRUE), nb. = dplyr::n(), nb.notNa = sum(!is.na(BM_FS.FI_dist.))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1663 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1664 bm_fs_fi_dist_stat <- dplyr::ungroup(bm_fs_fi_dist_stat) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1665 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1666 # Quality scale based on quartiles |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1667 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1668 if (choice == "N") { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1669 one <- round(mean(unlist(dplyr::filter(matri_full, BM_FS.FI_dist. <= quantile(matri_full$BM_FS.FI_dist., 0.25, na.rm = TRUE))["BM_FS.FI_dist."])), digits = 3) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1670 two <- round(mean(unlist(dplyr::filter(matri_full, BM_FS.FI_dist. > quantile(matri_full$BM_FS.FI_dist., 0.25, na.rm = TRUE) & BM_FS.FI_dist. <= quantile(matri_full$BM_FS.FI_dist., 0.5, na.rm = TRUE))["BM_FS.FI_dist."])), digits = 3) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1671 three <- round(mean(unlist(dplyr::filter(matri_full, BM_FS.FI_dist. > quantile(matri_full$BM_FS.FI_dist., 0.5, na.rm = TRUE) & BM_FS.FI_dist. <= quantile(matri_full$BM_FS.FI_dist., 0.75, na.rm = TRUE))["BM_FS.FI_dist."])), digits = 3) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1672 four <- round(mean(unlist(dplyr::filter(matri_full, BM_FS.FI_dist. > quantile(matri_full$BM_FS.FI_dist., 0.75, na.rm = TRUE))["BM_FS.FI_dist."])), digits = 3) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1673 }else { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1674 one <- 0.47 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1675 two <- 0.7 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1676 three <- 0.83 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1677 four <- 0.98 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1678 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1679 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1680 val_xmax <- as.Date(paste0(as.character(choice_date + 1), "-01-01"), origin = "1970-01-01") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1681 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1682 for (i in c(1:length(unique(bm_fs_fi_dist_stat$Site)))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1683 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1684 df1 <- dplyr::filter(bm_fs_fi_dist_stat, bm_fs_fi_dist_stat$Site == unique(bm_fs_fi_dist_stat$Site)[i]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1685 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1686 bm_fs_fi_plot <- ggplot2::ggplot() + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1687 ggplot2::geom_point(ggplot2::aes(x = bm_fs_fi_dist_stat$Date, y = bm_fs_fi_dist_stat$BM_FS.FI_dist.med), col = "grey") + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1688 ggplot2::geom_rect(ggplot2::aes(xmin = as.Date("2013-01-01", origin = "1970-01-01"), xmax = val_xmax, ymin = - 0.1, ymax = one, fill = "blue"), alpha = 0.3) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1689 ggplot2::geom_rect(ggplot2::aes(xmin = as.Date("2013-01-01", origin = "1970-01-01"), xmax = val_xmax, ymin = one, ymax = two, fill = "green"), alpha = 0.3) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1690 ggplot2::geom_rect(ggplot2::aes(xmin = as.Date("2013-01-01", origin = "1970-01-01"), xmax = val_xmax, ymin = two, ymax = three, fill = "yellow"), alpha = 0.3) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1691 ggplot2::geom_rect(ggplot2::aes(xmin = as.Date("2013-01-01", origin = "1970-01-01"), xmax = val_xmax, ymin = three, ymax = four, fill = "orange"), alpha = 0.3) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1692 ggplot2::geom_rect(ggplot2::aes(xmin = as.Date("2013-01-01", origin = "1970-01-01"), xmax = val_xmax, ymin = four, ymax = 1.1, fill = "red"), alpha = 0.3) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1693 ggplot2::scale_fill_manual(values = c("#FF0000", "#F59404", "#18E125", "#1A1AE8", "#FAFA15")) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1694 ggplot2::geom_pointrange(ggplot2::aes(x = df1$Date, y = df1$BM_FS.FI_dist.med, ymin = df1$BM_FS.FI_dist.min, ymax = df1$BM_FS.FI_dist.max), col = "black") + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1695 ggplot2::xlab("Date") + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1696 ggplot2::ylab("Coef dissim BM FS-FI") + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1697 ggplot2::ggtitle(unique(df1$Site_bis)) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1698 ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 90, vjust = 0.5, hjust = 1), legend.position = "none") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1699 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1700 ggplot2::ggsave(paste0("fs_fi_", df1$Site, ".png"), device = "png", bm_fs_fi_plot, height = 3, width = 3.5) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1701 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1702 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1703 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1704 rm(df1, four, i, one, three, two, xmax_, xmin_, ymax_, ymin_) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1705 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1706 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1707 ## BM.BF_FS_dist => mobile boulder vs fixed boulder upper faces |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1708 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1709 # Stats |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1710 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1711 bm_bf_fs_dist_stat <- matri_full %>% dplyr::group_by(Site, Site_bis, Date, Year, Month, Day) %>% dplyr::summarize(BM.BF_FS_dist.moy = mean(BM.BF_FS_dist., na.rm = TRUE), BM.BF_FS_dist.et = sd(BM.BF_FS_dist., na.rm = TRUE), BM.BF_FS_dist.med = median(BM.BF_FS_dist., na.rm = TRUE), BM.BF_FS_dist.min = min(BM.BF_FS_dist., na.rm = TRUE), BM.BF_FS_dist.max = max(BM.BF_FS_dist., na.rm = TRUE), nb. = dplyr::n(), nb.notNa = sum(!is.na(BM.BF_FS_dist.))) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1712 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1713 bm_bf_fs_dist_stat <- dplyr::ungroup(bm_bf_fs_dist_stat) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1714 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1715 # Quality scale based on quartiles |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1716 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1717 if (choice == "N") { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1718 one <- round(mean(unlist(dplyr::filter(matri_full, BM.BF_FS_dist. <= quantile(matri_full$BM.BF_FS_dist., 0.25, na.rm = TRUE))["BM.BF_FS_dist."])), digits = 3) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1719 two <- round(mean(unlist(dplyr::filter(matri_full, BM.BF_FS_dist. > quantile(matri_full$BM.BF_FS_dist., 0.25, na.rm = TRUE) & BM.BF_FS_dist. <= quantile(matri_full$BM.BF_FS_dist., 0.5, na.rm = TRUE))["BM.BF_FS_dist."])), digits = 3) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1720 three <- round(mean(unlist(dplyr::filter(matri_full, BM.BF_FS_dist. > quantile(matri_full$BM.BF_FS_dist., 0.5, na.rm = TRUE) & BM.BF_FS_dist. <= quantile(matri_full$BM.BF_FS_dist., 0.75, na.rm = TRUE))["BM.BF_FS_dist."])), digits = 3) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1721 four <- round(mean(unlist(dplyr::filter(matri_full, BM.BF_FS_dist. > quantile(matri_full$BM.BF_FS_dist., 0.75, na.rm = TRUE))["BM.BF_FS_dist."])), digits = 3) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1722 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1723 }else { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1724 one <- 0.19 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1725 two <- 0.32 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1726 three <- 0.455 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1727 four <- 0.735 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1728 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1729 # Plot |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1730 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1731 for (i in c(1:length(unique(bm_bf_fs_dist_stat$Site)))) { |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1732 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1733 df1 <- dplyr::filter(bm_bf_fs_dist_stat, bm_bf_fs_dist_stat$Site == unique(bm_bf_fs_dist_stat$Site)[i]) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1734 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1735 bm_bf_fs_plot <- ggplot2::ggplot() + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1736 ggplot2::geom_point(ggplot2::aes(x = bm_bf_fs_dist_stat$Date, y = bm_bf_fs_dist_stat$BM.BF_FS_dist.med), col = "grey") + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1737 ggplot2::geom_rect(ggplot2::aes(xmin = as.Date("2013-01-01", origin = "1970-01-01"), xmax = val_xmax, ymin = - 0.1, ymax = one, fill = "red"), alpha = 0.3) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1738 ggplot2::geom_rect(ggplot2::aes(xmin = as.Date("2013-01-01", origin = "1970-01-01"), xmax = val_xmax, ymin = one, ymax = two, fill = "orange"), alpha = 0.3) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1739 ggplot2::geom_rect(ggplot2::aes(xmin = as.Date("2013-01-01", origin = "1970-01-01"), xmax = val_xmax, ymin = two, ymax = three, fill = "yellow"), alpha = 0.3) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1740 ggplot2::geom_rect(ggplot2::aes(xmin = as.Date("2013-01-01", origin = "1970-01-01"), xmax = val_xmax, ymin = three, ymax = four, fill = "green"), alpha = 0.3) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1741 ggplot2::geom_rect(ggplot2::aes(xmin = as.Date("2013-01-01", origin = "1970-01-01"), xmax = val_xmax, ymin = four, ymax = 1.1, fill = "blue"), alpha = 0.3) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1742 ggplot2::scale_fill_manual(values = c("#FF0000", "#F59404", "#18E125", "#1A1AE8", "#FAFA15")) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1743 ggplot2::geom_pointrange(ggplot2::aes(x = df1$Date, y = df1$BM.BF_FS_dist.med, ymin = df1$BM.BF_FS_dist.min, ymax = df1$BM.BF_FS_dist.max), col = "black") + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1744 ggplot2::xlab("Date") + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1745 ggplot2::ylab("Coef dissim BM-BF FS") + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1746 ggplot2::ggtitle(unique(df1$Site_bis)) + |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1747 ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 90, vjust = 0.5, hjust = 1), legend.position = "none") |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1748 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1749 ggplot2::ggsave(paste0("bm_bf_", df1$Site, ".png"), device = "png", bm_bf_fs_plot, height = 3, width = 3.5) |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1750 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1751 } |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1752 |
7e6cc3da1189
planemo upload for repository https://github.com/Marie59/champ_blocs commit 8b6fcddd239979c11977472de6cbb349690758c8
ecology
parents:
diff
changeset
|
1753 rm(df1, four, i, one, three, two, xmax_, xmin_, ymax_, ymin_) |