R/l_tools.R
generate_and_write_author_rmd.RdThis function takes a data frame with two columns (Author, Affiliation),
deduplicates authors and affiliations while preserving their original order,
optionally adds custom author notes (e.g., "*", "#"), and writes the formatted
author list and affiliation footnotes into a .Rmd file compatible with
bookdown::word_document2 output.
generate_and_write_author_rmd(
df,
file,
affiliation_df = NULL,
author_note = NULL
)A data frame with two columns: the first for author names and the second for affiliations.
Character. Output file path (e.g., "authors.Rmd") to write the formatted content.
Optional. A data frame of affiliations to define a fixed ordering. If NULL, uses unique order from df.
Optional. A data frame with two columns: Author and Note, specifying symbol(s) (e.g., *, #) to append to each author.
Invisibly returns a list with author_line and affiliation_list components.