Skip to content

Commit de8e269

Browse files
authored
Merge pull request #7 from eliteportal/abstract_date_changes
Abstract and date updates
2 parents a71a3bb + 5ec6a60 commit de8e269

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

inst/scripts/query-pubmed-grants.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,11 @@ if (nrow(pmids_df) == 0) {
247247
dat$title <- hacky_cleaning(dat$title)
248248
dat$authors <- hacky_cleaning(dat$authors)
249249
dat$journal <- remove_unacceptable_characters(dat$fulljournalname)
250-
251-
# dat$abstract <- hacky_cleaning(dat$abstract)
250+
dat$abstract <- hacky_cleaning(dat$abstract)
251+
dat$publicationDate <- stringr::str_extract(dat$pubdate, "\\d{4}-\\d{2}-\\d{2}")
252252

253253
# drop unnecessary columns
254-
dat <- dat %>% select(-c('applid', 'result', 'pubdate'))
254+
dat <- dat %>% select(-c('applid', 'result'))
255255
cat(
256256
'Total rows: ',
257257
nrow(dat),
@@ -292,6 +292,7 @@ if (nrow(pmids_df) == 0) {
292292
"Title" = "title",
293293
"Year" = "year",
294294
"Program" = "program",
295+
"description" = "abstract",
295296
)
296297

297298
# Remove common, unallowed characters from entity name; includes hacky_cleaning

0 commit comments

Comments
 (0)