Skip to content

Commit b79badc

Browse files
author
andreaspacher
committed
fix some errors
1 parent f24ed4a commit b79badc

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

Script/scrape-example-with-CambridgeUnivPress.R

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
library('dplyr') # --------------- for bind_rows() & select()
2-
library('stringr') # ------------- for str_extract_all()
3-
4-
# obtain a dataframe of MDPI journals
1+
# obtain a dataframe of CUP journals
52
journals <- read.csv("Data\\alljournals.csv")
63
journals <- journals[journals$publisher == "Cambridge University Press",]
74

85
# get journal abbreviations from the URLs
9-
Abbr <- str_extract_all(journals$url, "(?<=/journals/).*")
6+
Abbr <- stringr::str_extract_all(journals$url, "(?<=/journals/).*")
107
Abbr <- unlist(Abbr)
118

129
# prepare the scraping process
@@ -28,6 +25,7 @@ for(i in 1:length(journals)) {
2825
Sys.sleep(11)
2926
}
3027

28+
library(tidyverse)
3129
DF <- dplyr::bind_rows(EdList) %>%
3230
select(publisher, journal, role, editor, affiliation, url, date)
3331

0 commit comments

Comments
 (0)