-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
129 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# install.packages("cffr") | ||
library(cffr) | ||
|
||
packageVersion("cffr") | ||
|
||
# Hard code doi | ||
doi <- "10.5281/zenodo.10878608" | ||
|
||
# creates CFF with all author roles | ||
mod_cff <- cff_create("DESCRIPTION", | ||
dependencies = FALSE, | ||
keys = list("doi" = doi, | ||
"date-released" = Sys.Date())) | ||
|
||
# Remove the preferred-citation key | ||
mod_cff$`preferred-citation` <- NULL | ||
|
||
# writes the CFF file | ||
cff_write(mod_cff) | ||
|
||
# Now write a CITATION file from the CITATION.cff file | ||
# Use inst/CITATION instead (the default if not provided) | ||
path_cit <- file.path("inst/CITATION") | ||
|
||
a_cff <- cff_read(path = "CITATION.cff") | ||
|
||
cff_write_citation(a_cff, file = path_cit) | ||
|
||
# By last, read the citation | ||
cat(readLines(path_cit), sep = "\n") |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.