Skip to content

Commit

Permalink
Tweaks.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@84982 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
hornik committed Aug 17, 2023
1 parent 2a28d72 commit 3bf4089
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/library/utils/R/citation.R
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,19 @@ function(bibtype, textVersion = NULL, header = NULL, footer = NULL, key = NULL,
rval[[i]] <- as.person(rval[[i]])
}
if(any(!pos)) {
for(i in which(!pos))
rval[[i]] <- trimws(paste(as.character(rval[[i]]),
collapse = " "))
for(i in which(!pos)) {
s <- trimws(as.character(rval[[i]]))
## <NOTE>
## Further above we did
## rval <- rval[!vapply(rval, .is_not_nonempty_text, NA)]
## which filters out args with *any* NA.
## We could perhaps change this to test with not all NA
## instead, in which case the NA test below would come
## into action.
rval[[i]] <- paste(s[!is.na(s) & nzchar(s)],
collapse = " ")
## </NOTE>
}
}

## set attributes
Expand Down

0 comments on commit 3bf4089

Please sign in to comment.