Description Usage Arguments Examples
If the 'Authors@R' field is not included in the DESCRIPTION file then 'use_author()' adds the field assigns the author defined by the input parameters. If the 'Authors@R' field exists already in the DESCRIPTION then 'use_author()' will add the author defined by the input parameters as an additional new author.
The 'use_author()' function should be used after [create_package()] or [use_description()].
If you create a lot of packages, consider storing personalized defaults as a named list in an option named '"usethis.description"'. [use_description()] will automatically fill using this information. Here's an example of code to include in '.Rprofile':
“‘ options( usethis.description = list( 'Authors@R' = ’person("Jane", "Doe", email = "jane@example.com", role = "aut", comment = c(ORCID = "YOUR-ORCID-ID"))', License = "MIT + file LICENSE", Language = "es" ) ) “'
1 2 3 4 5 6 7 | use_author(
given = "Jane",
family = "Doe",
role = "aut",
email = "jane@example.com",
comment = c(ORCID = "YOUR-ORCID-ID")
)
|
given |
a character string with the given (first) name of the author. |
family |
a character string with the family (last) name of the author. |
role |
a character vector specifying the role of the person to be added. |
email |
a character string giving an e-mail address of the author to be added. |
comment |
a character string providing comments related to the author to be added. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
# Adds the default Jane Doe to author
use_author()
# Adds the author information for Ali
use_author(
given = "Ali",
family = "Val",
role = "aut",
email = "alval@example.com",
comment = c(ORCID = "YOUR-ORCID-ID")
)
# Adds a second author Ali2
use_author(
given = "Ali2",
family = "Val2",
role = "cph",
email = "alval2@example.com",
comment = NULL
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.