You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies in advance I'll admit I'm not 100% sure what I am doing so sorry if this is actually user error...
For our package we wanted to retain the default automatically generated citation but add in an additional publication citation. It appears the recommended way to do this from the pkgdown docs is to use a inst/citation file. Additionally from the R/CRAN manual they provide an example of retaining the automatic generated entry whilst including an additional static bibtex entry by populating the file as:
## R package reference generated from DESCRIPTION metadata
citation(auto = meta)
## NLME book
bibentry(bibtype = "Book",
title = "Mixed-Effects Models in S and S-PLUS",
author = c(person(c("José", "C."), "Pinheiro"),
person(c("Douglas", "M."), "Bates")),
year = "2000", publisher = "Springer", address = "New York",
doi = "10.1007/b98882")
However when we do this and then use pkgdown::build_home() we get the following warning
Warning message:
In citation(auto = meta) :
could not determine year for ‘rbmi’ from package DESCRIPTION file
Which results in the citation date being populated as ???:
This appears to be due to the Date information not being populated in our DESCRIPTION file, though searching online I can see a couple of posts from tidyverse members who recommend not populating this field as it will be populated automatically upon CRAN submission and if done manually will likely get out of date.
Would it be possible to address this within pkgdown or is there something I am missing here? Currently I am working around this by adding the following to my inst/citation file (though it is not clear to me how robust this is):
if (is.null(meta[["Date/Publication"]])) {
meta["Date/Publication"] <- as.character(Sys.time())
}
The text was updated successfully, but these errors were encountered:
Apologies in advance I'll admit I'm not 100% sure what I am doing so sorry if this is actually user error...
For our package we wanted to retain the default automatically generated citation but add in an additional publication citation. It appears the recommended way to do this from the pkgdown docs is to use a
inst/citation
file. Additionally from the R/CRAN manual they provide an example of retaining the automatic generated entry whilst including an additional static bibtex entry by populating the file as:However when we do this and then use
pkgdown::build_home()
we get the following warningWhich results in the citation date being populated as
???
:This appears to be due to the Date information not being populated in our DESCRIPTION file, though searching online I can see a couple of posts from tidyverse members who recommend not populating this field as it will be populated automatically upon CRAN submission and if done manually will likely get out of date.
Would it be possible to address this within pkgdown or is there something I am missing here? Currently I am working around this by adding the following to my
inst/citation
file (though it is not clear to me how robust this is):The text was updated successfully, but these errors were encountered: