[R-pkg-devel] dateset with roxygen2?
Diego Hernangómez Herrero
d|ego@hern@ngomezherrero @end|ng |rom gm@||@com
Thu Sep 25 09:17:08 CEST 2025
Hi:
Remove 'MaddisonCountries.rda' of your '.Rbuildignore' file.
This line makes that when you build your package you are in fact not
shipping the dataset, and therefore the R CMD CHECK is failing.
See the commit on my fork and the checks in GH actions:
- Commit:
https://github.com/dieghernan/SS4Maddison/commit/fe1e15626870f1eb573576e182cdaff5a456ec55
- Checks:
https://github.com/dieghernan/SS4Maddison/actions/workflows/R-CMD-check.yaml
El jue, 25 sept 2025 a las 2:06, Spencer Graves (<
spencer.graves using effectivedefense.org>) escribió:
> Hi, John:
>
>
> On 9/24/25 16:27, John Benninghoff wrote:
> > Hi Spencer, I tried downloading your GitHub repo. I wasn’t able to
> replicate your R CMD check results. I did find issues with the DESCRIPTION
> file, which I fixed by removing the blank “Imports” and running
> desc::desc_normalize(). After that, running rcmdcheck::rcmdcheck() returned
> 0 errors, warnings, and notes.
>
>
> Thanks.
>
>
> I got what you got with "rcmdcheck::rcmdcheck()".
>
>
> Sadly, GitHub Actions still reported the previous warning after I
> committed the change you suggested to DESCRIPTION AND locally using the
> process I found recommended in "R Projects":
>
>
> library(devtools)
> document() # add
> load_all()
> check()
>
>
> I'm currently trying to develop a toy package using roxygen2:
>
>
> https://github.com/sbgraves237/roxygenData1
>
>
> This toy package currently consists only of boilerplate with zero content.
>
>
> Thanks for your help. roxygen2 sounds great, but it cannot be used if a
> problem like this cannot be fixed with a finite amount of effort ;-)
>
>
> Spencer
>
> >
> >> On Sep 24, 2025, at 3:32 PM, Spencer Graves <
> spencer.graves using effectivedefense.org> wrote:
> >>
> >> Hi, Michael et al.:
> >>
> >>
> >> On 9/24/25 11:59, Michael Chirico wrote:
> >>> {ggplot2} has a number of data sets, you might read over their sources:
> >>> https://github.com/tidyverse/ggplot2/blob/main/R/data.R <https://
> github.com/tidyverse/ggplot2/blob/main/R/data.R>
> >>
> >>
> >> Thanks. I don't see anything there that is different from the example
> in their book, which is extracted from the similar data.R file in their
> tidyr package, which I reviewed earlier.[2]
> >>
> >>
> >> I've deleted virtually everything else in that package and still get
> that same error.
> >>
> >>
> >> Suggestions?
> >> Spencer Graves
> >>
> >>
> >> p.s. I've done several web searches on this issue, found discussions on
> StackOverflow that may have worked a few years ago, but roxygen2 seems to
> have changes since then. I posted a similar question to StackOverflow, that
> generated a few comments but nothing that seemed to fix this problem. I
> reported an "issue" to the R Packages book on GitHub last week, so far with
> nothing:
> >>
> >>
> >> https://github.com/hadley/r-pkgs/issues/1106
> >>
> >>
> >> I tried to use roxygen2 with a different project a year ago and gave up
> after being unable to figure out how to use it. >
> >>> On Wed, Sep 24, 2025 at 5:48 AM Spencer Graves <
> spencer.graves using effectivedefense.org <mailto:
> spencer.graves using effectivedefense.org>> wrote:
> >>> Hello, All:
> >>> How does one document a dataset with roxygen2?
> >>> I've recently read Wickham and Bryan, R Packages (2e).[1] I've
> tried to
> >>> do what they say there, and R CMD check is reporting:
> >>> Variables with usage in Rd file 'MaddisonCountries.Rd' but not
> in
> >>> code:
> >>> ‘MaddisonCountries’
> >>> This is in "https://github.com/sbgraves237/SS4Maddison <https://
> >>> github.com/sbgraves237/SS4Maddison>".
> >>> Suggestions? Thanks, Spencer Graves
> >>> p.s. Wickham and Bryan Section 7.1.2 says, "Objects in data/ are
> always
> >>> effectively exported .... . This means that they must be
> >>> documented. ...
> >>> [Y]ou document the name of the dataset and save it in R/. For
> example,
> >>> the roxygen2 block used to document the who data in tidyr is saved
> in
> >>> R/data.R ... . There are two roxygen tags that are especially
> important
> >>> for documenting datasets: @format ... @source
> >>> They give an example of a "who" dataset in tidyr. I've studied that
> >>> example without finding what I'm doing wrong.[2]
> >>> In addition, I need to specify Roygen and "LazyData: true" in
> >>> DESCRIPTION.
> >>> [1] Wickham and Bryan, R Packages online at:
> >>> https://r-pkgs.org/ <https://r-pkgs.org/>
> >>> Chapter 7 deals with Data:
> >>> https://r-pkgs.org/data.html <https://r-pkgs.org/data.html>
> >>> [2] "data.R" in tidyr is available at:
> >>> https://github.com/tidyverse/tidyr/blob/main/R/data.R <https://
> >>> github.com/tidyverse/tidyr/blob/main/R/data.R>
> >>> ______________________________________________
> >>> R-package-devel using r-project.org <mailto:
> R-package-devel using r-project.org>
> >>> mailing list
> >>> https://stat.ethz.ch/mailman/listinfo/r-package-devel <https://
> >>> stat.ethz.ch/mailman/listinfo/r-package-devel>
> >>>
> >>
> >> ______________________________________________
> >> R-package-devel using r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
--
Have a nice day!
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list