Skip to content

Commit

Permalink
Switch get_affiliations()/get_notes() arguments (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudgallou committed Dec 14, 2023
1 parent f7a931b commit 5c8aa66
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
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.

0 comments on commit 5c8aa66

Please sign in to comment.