Mercurial > repos > ecology > cb_dissim
annotate loop_col_scale.r @ 1:f941081e03f0 draft default tip
planemo upload for repository https://github.com/Marie59/champ_blocs commit 075fd90d1a39ae7912b48549e5537971635b9620
| author | ecology | 
|---|---|
| date | Sat, 18 Mar 2023 16:48:52 +0000 | 
| parents | 42b51a52e308 | 
| children | 
| rev | line source | 
|---|---|
| 
0
 
42b51a52e308
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
 
ecology 
parents:  
diff
changeset
 | 
1 library("rmarkdown") | 
| 
 
42b51a52e308
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
 
ecology 
parents:  
diff
changeset
 | 
2 | 
| 
 
42b51a52e308
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
 
ecology 
parents:  
diff
changeset
 | 
3 df <- indic | 
| 
 
42b51a52e308
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
 
ecology 
parents:  
diff
changeset
 | 
4 df_full <- indic_full | 
| 
 
42b51a52e308
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
 
ecology 
parents:  
diff
changeset
 | 
5 dir.create("results") | 
| 
 
42b51a52e308
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
 
ecology 
parents:  
diff
changeset
 | 
6 slices <- unique(df$Site)[!is.na(unique(df$Site))] | 
| 
 
42b51a52e308
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
 
ecology 
parents:  
diff
changeset
 | 
7 | 
| 
 
42b51a52e308
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
 
ecology 
parents:  
diff
changeset
 | 
8 for (v in slices) { | 
| 
 
42b51a52e308
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
 
ecology 
parents:  
diff
changeset
 | 
9 rmarkdown::render(report, | 
| 
 
42b51a52e308
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
 
ecology 
parents:  
diff
changeset
 | 
10 output_file = paste0(v, ".docx"), | 
| 
 
42b51a52e308
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
 
ecology 
parents:  
diff
changeset
 | 
11 output_dir = file.path("results"), | 
| 
 
42b51a52e308
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
 
ecology 
parents:  
diff
changeset
 | 
12 params = list(Site = v) | 
| 
 
42b51a52e308
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
 
ecology 
parents:  
diff
changeset
 | 
13 ) | 
| 
 
42b51a52e308
planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
 
ecology 
parents:  
diff
changeset
 | 
14 } | 
