Skip to contents

Combines each author's contribution statement into a clear paragraph. Each line indicates the author and their specific contribution.

Usage

generate_contribution(
  data,
  style = c("paragraph", "bullets", "numbered"),
  list_style = NULL
)

Arguments

data

A data frame containing at least the columns: FirstName, LastName, and Contribution.

style

Output style: "paragraph", "bullets", or "numbered".

list_style

Deprecated. Use style. When provided, TRUE maps to "bullets" and FALSE maps to "paragraph".

Value

A character string summarizing the author contributions.

Examples

authors <- data.frame(
  FirstName = c("Alice", "Bob"),
  LastName = c("Smith", "Johnson"),
  Contribution = c("Conceptualization; Data curation", "Supervision; Writing - review"),
  stringsAsFactors = FALSE
)
generate_contribution(authors, style = "paragraph")
#> [1] "Alice Smith contributed as follows: Conceptualization; Data curation; Bob Johnson contributed as follows: Supervision; Writing - review"