Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch get_affiliations()/get_notes() arguments #54

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# plume (development version)

* The order of `$get_affiliations()`/`$get_notes()` parameters have been switched for consistency purposes (#54).

# plume 0.2.1

* Fixed `$get_contributions()` wrongly reordering authors when using CRediT roles and `by_author = TRUE` (#50).
Expand Down
14 changes: 7 additions & 7 deletions R/plume.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,19 @@ Plume <- R6Class(
},

#' @description Get authors' affiliations.
#' @param sep Separator used to separate affiliation ids and affiliations.
#' @param superscript Should affiliation ids be superscripted?
#' @param sep Separator used to separate affiliation ids and affiliations.
#' @return A character vector.
get_affiliations = function(sep = "", superscript = TRUE) {
private$get_footnotes("affiliation", sep, superscript)
get_affiliations = function(superscript = TRUE, sep = "") {
private$get_footnotes("affiliation", superscript, sep)
},

#' @description Get authors' notes.
#' @param sep Separator used to separate note ids and notes.
#' @param superscript Should note ids be superscripted?
#' @param sep Separator used to separate note ids and notes.
#' @return A character vector.
get_notes = function(sep = "", superscript = TRUE) {
private$get_footnotes("note", sep, superscript)
get_notes = function(superscript = TRUE, sep = "") {
private$get_footnotes("note", superscript, sep)
},

#' @description Get authors' ORCID.
Expand Down Expand Up @@ -295,7 +295,7 @@ Plume <- R6Class(
als_make(out, .cols, format)
},

get_footnotes = function(var, sep, superscript) {
get_footnotes = function(var, superscript, sep) {
col <- private$pick(var)
private$check_col(col)
check_string(sep)
Expand Down
12 changes: 6 additions & 6 deletions man/Plume.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.