Add an author

add_author(study, surname, given = "", orcid = NULL, roles = c(), ...)

Arguments

study

A study list object with class scivrs_study

surname

a character string with the author's last name(s)

given

a character string with the author's given name(s)

orcid

the author's unique ORCiD (see https://orcid.org/)

roles

a vector of roles from the CRediT taxonomy (see https://casrai.org/credit/); use credit_roles() to view the full list

...

further info to add to author object

Value

A study object with class scivrs_study

Examples

s <- study() %>% add_author( surname = "DeBruine", given = "Lisa M.", orcid = "0000-0002-7523-5539", roles = c("Conceptualization", "Methodology") ) study_to_json(s)
#> { #> "name": "Demo Study", #> "info": [], #> "authors": [ #> { #> "orcid": "0000-0002-7523-5539", #> "name": { #> "surname": "DeBruine", #> "given": "Lisa M." #> }, #> "roles": [ #> "Conceptualization", #> "Methodology" #> ] #> } #> ], #> "hypotheses": [], #> "methods": [], #> "data": [], #> "analyses": [] #> } #>