Skip to contents

Produces a readable conflict statement. If all authors report no conflict, it states so. Otherwise, it lists the authors reporting conflicts and then indicates that the remaining authors declare no conflict.

Usage

generate_conflict(data, style = c("paragraph", "bullets", "numbered"))

Arguments

data

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

style

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

Value

A character string with the formatted conflict statement.

Examples

authors <- data.frame(
  FirstName = c("Alice", "Bob"),
  LastName = c("Smith", "Johnson"),
  Conflict = c("No conflict", "Consultant at Company Z"),
  stringsAsFactors = FALSE
)
generate_conflict(authors, style = "paragraph")
#> [1] "The following authors report conflicts of interest: Bob Johnson (Consultant at Company Z). All other authors (Alice Smith) declare no conflict of interest."