Skip to content

Commit ce6f0ff

Browse files
committed
fix loop to download all docx files from habitatauteurs
1 parent d50d3d8 commit ce6f0ff

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/R/habitatauteurs_from_docx.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ library(parsermd)
55
library(googledrive)
66
library(jsonlite)
77
#library(synthesisr) might be interesting to find and remove duplicates from the
8-
#however, they do not allow to keep the labels that the bib items already have.
8+
# bibliography.
9+
# however, they do not allow to keep the labels that the bib items already have.
10+
11+
drive_auth()
912

1013
#download the docx files from google drive
1114
folder <- "https://drive.google.com/drive/folders/10cZDtfWFMglGF4ICvBzv6HXkfsqT3eP1"
@@ -21,7 +24,7 @@ if (!file.exists(
2124
has_file("EU_rapportage_habitats.Rproj")))
2225
}
2326
#download all files in the local folder
24-
for (i in seq_along(files$name)) {
27+
for (i in which(str_detect(files$name, ".docx"))) {
2528
drive_download(
2629
as_id(files$id[i]),
2730
path =

0 commit comments

Comments
 (0)