Format CRediT Contributions with Optional Author Name Shortening

format_credit_contributions(df, short_name = FALSE)

Arguments

df

A data frame with columns Author and Contributions

short_name

Logical. If TRUE, format author names as initials (e.g., C.P.)

Value

A character string summarizing contributions in the format: "Conceptualization, A, B; Methodology, C, D; ..."

Examples

df <- data.frame(
  Author = c("Chen Peng", "Xin Wei"),
  Contributions = c("Methodology,Visualization", "Methodology")
)
format_credit_contributions(df, short_name = TRUE)
#> [1] "Methodology, C.P., X.W.; Visualization, C.P."