Re: [R-pkg-devel] How and where do I document sysdata.rda
Did you seriously look for instructions and not find [1]? And why do you think the answer should not involve Rd files? Documentation in R packages is what Rd files are for. If you don't want to mess with Rd files then you have no choice but to use something like the Roxygen package to mess with them for you... but that just kicks the can down the road .. Rd files are always involved. [1] https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Documenting-data-sets On March 20, 2025 7:39:39 AM PDT, Lists wrote: >I want to put a look-up table into sysdata.rda to avoid having to compute it >everytime. At the moment I create it and save the resulting file and then >manually copy it to sysdata.rda. This works but the package now contains no >documentation about the look-up table. > >Most of the information which I turned up online involves doing it all >indirectly using various packages. I do not want to do that, I am quite happy >editing files by hand and moving them to where I want them by hand. So what I >need is to know where I should put the documentation and what format it should >be assuming it is not an Rd file. > >Of course what I want may be impossible and I just need to document it in the >script which creates it but that seems messy. > >Michael Dewey > >__ >R-package-devel@r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-package-devel -- Sent from my phone. Please excuse my brevity. __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] How and where do I document sysdata.rda
Le Thu, Mar 20, 2025 at 12:56:49PM -0400, Kevin R. Coombes a ??crit : > If it is *only *in sysdata.Rda, then it is accessible to your package > code but is not available to users. (They can't, for example, use the > "data" function to load it themselves.) So, there is no reason to > document it. Hello Kevin and Michael, Users who care about software provenance, security and software freedom would love to see it documented, because binary objects are hard to audit when there is no description of what they are expected to contain. Redistributors who give guarantees to their users about software freedom, like Debian, also want to see that these objects are easy to modify in case of need (that is: the developer does not keep some secret receipes about how the object is made to keep an advantage against forks and other forms of competition), and to be able to check by themselves that they were not built from data that is not placed under too restrictive terms. When I write R packages and when I reeistribute CRAN/Bioconductor pakcages in Debian, I find that the way documented in the R Packages book (./data-raw/, usethis::use_data(), etc.) fits my needs very well. Have a nice day, Charles -- Charles Plessy Nagahama, Yomitan, Okinawa, Japan Debian Med packaging team http://www.debian.org/devel/debian-med Tooting from home https://framapiaf.org/@charles_plessy - You do not have my permission to use this email to train an AI - __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] How and where do I document sysdata.rda
I want to put a look-up table into sysdata.rda to avoid having to compute it everytime. At the moment I create it and save the resulting file and then manually copy it to sysdata.rda. This works but the package now contains no documentation about the look-up table. Most of the information which I turned up online involves doing it all indirectly using various packages. I do not want to do that, I am quite happy editing files by hand and moving them to where I want them by hand. So what I need is to know where I should put the documentation and what format it should be assuming it is not an Rd file. Of course what I want may be impossible and I just need to document it in the script which creates it but that seems messy. Michael Dewey __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] How and where do I document sysdata.rda
If it is *only *in sysdata.Rda, then it is accessible to your package code but is not available to users. (They can't, for example, use the "data" function to load it themselves.) So, there is no reason to document it. Just like there is no reason to document functions in your R scripts that were not exported into user space. Of course, you can document those functions by using the keyword "internal" in an Rd file. I suspect that this would work to document your internal data set as well. On 3/20/2025 12:47 PM, Lists wrote: > Dear Jeff > > I am afraid that does not work if the data file is in sysdata.rda. I > had to remove my existing Rd file to get the package to pass checks. > > Michael > > On 20/03/2025 15:15, Jeff Newmiller wrote: >> Did you seriously look for instructions and not find [1]? And why do >> you think the answer should not involve Rd files? Documentation in R >> packages is what Rd files are for. >> >> If you don't want to mess with Rd files then you have no choice but >> to use something like the Roxygen package to mess with them for >> you... but that just kicks the can down the road .. Rd files are >> always involved. >> >> [1] >> https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Documenting-data-sets >> >> On March 20, 2025 7:39:39 AM PDT, Lists wrote: >>> I want to put a look-up table into sysdata.rda to avoid having to >>> compute it everytime. At the moment I create it and save the >>> resulting file and then manually copy it to sysdata.rda. This works >>> but the package now contains no documentation about the look-up table. >>> >>> Most of the information which I turned up online involves doing it >>> all indirectly using various packages. I do not want to do that, I >>> am quite happy editing files by hand and moving them to where I want >>> them by hand. So what I need is to know where I should put the >>> documentation and what format it should be assuming it is not an Rd >>> file. >>> >>> Of course what I want may be impossible and I just need to document >>> it in the script which creates it but that seems messy. >>> >>> Michael Dewey >>> >>> __ >>> R-package-devel@r-project.org mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-package-devel >> > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] How and where do I document sysdata.rda
Here are about 60 CRAN packages discussing sysdata in their Rd files: https://github.com/search?q=org%3Acran+path%3A.Rd+%2F%28%5B%5E%7B+%5D%7C%5B%5Ed%5D%5C%7B%29%5Cs*sysdata%2F&type=code You might take a cue from them. Indeed \keyword{internal} is common there. On Thu, Mar 20, 2025 at 9:57 AM Kevin R. Coombes wrote: > If it is *only *in sysdata.Rda, then it is accessible to your package > code but is not available to users. (They can't, for example, use the > "data" function to load it themselves.) So, there is no reason to > document it. Just like there is no reason to document functions in your > R scripts that were not exported into user space. Of course, you can > document those functions by using the keyword "internal" in an Rd file. > I suspect that this would work to document your internal data set as well. > > On 3/20/2025 12:47 PM, Lists wrote: > > Dear Jeff > > > > I am afraid that does not work if the data file is in sysdata.rda. I > > had to remove my existing Rd file to get the package to pass checks. > > > > Michael > > > > On 20/03/2025 15:15, Jeff Newmiller wrote: > >> Did you seriously look for instructions and not find [1]? And why do > >> you think the answer should not involve Rd files? Documentation in R > >> packages is what Rd files are for. > >> > >> If you don't want to mess with Rd files then you have no choice but > >> to use something like the Roxygen package to mess with them for > >> you... but that just kicks the can down the road .. Rd files are > >> always involved. > >> > >> [1] > >> > https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Documenting-data-sets > >> > >> On March 20, 2025 7:39:39 AM PDT, Lists > wrote: > >>> I want to put a look-up table into sysdata.rda to avoid having to > >>> compute it everytime. At the moment I create it and save the > >>> resulting file and then manually copy it to sysdata.rda. This works > >>> but the package now contains no documentation about the look-up table. > >>> > >>> Most of the information which I turned up online involves doing it > >>> all indirectly using various packages. I do not want to do that, I > >>> am quite happy editing files by hand and moving them to where I want > >>> them by hand. So what I need is to know where I should put the > >>> documentation and what format it should be assuming it is not an Rd > >>> file. > >>> > >>> Of course what I want may be impossible and I just need to document > >>> it in the script which creates it but that seems messy. > >>> > >>> Michael Dewey > >>> > >>> __ > >>> R-package-devel@r-project.org mailing list > >>> https://stat.ethz.ch/mailman/listinfo/r-package-devel > >> > > > > __ > > R-package-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-package-devel > > [[alternative HTML version deleted]] > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel > [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] How and where do I document sysdata.rda
Dear Jeff I am afraid that does not work if the data file is in sysdata.rda. I had to remove my existing Rd file to get the package to pass checks. Michael On 20/03/2025 15:15, Jeff Newmiller wrote: Did you seriously look for instructions and not find [1]? And why do you think the answer should not involve Rd files? Documentation in R packages is what Rd files are for. If you don't want to mess with Rd files then you have no choice but to use something like the Roxygen package to mess with them for you... but that just kicks the can down the road .. Rd files are always involved. [1] https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Documenting-data-sets On March 20, 2025 7:39:39 AM PDT, Lists wrote: I want to put a look-up table into sysdata.rda to avoid having to compute it everytime. At the moment I create it and save the resulting file and then manually copy it to sysdata.rda. This works but the package now contains no documentation about the look-up table. Most of the information which I turned up online involves doing it all indirectly using various packages. I do not want to do that, I am quite happy editing files by hand and moving them to where I want them by hand. So what I need is to know where I should put the documentation and what format it should be assuming it is not an Rd file. Of course what I want may be impossible and I just need to document it in the script which creates it but that seems messy. Michael Dewey __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] How and where do I document sysdata.rda
> > I am afraid that does not work if the data file is in sysdata.rda. I > > had to remove my existing Rd file to get the package to pass checks Maybe give more details? Did you use `data(xxx)` in the usage statement? If so, replace it with just the name of the dataset. Georgi Boshnakov From: R-package-devel on behalf of Michael Chirico Sent: 20 March 2025 17:05 To: Kevin R. Coombes Cc: r-package-devel@r-project.org Subject: Re: [R-pkg-devel] How and where do I document sysdata.rda Here are about 60 CRAN packages discussing sysdata in their Rd files: https://urldefense.com/v3/__https://github.com/search?q=org*3Acran*path*3A.Rd**A2F*28*5B*5E*7B**A5D*7C*5B*5Ed*5D*5C*7B*29*5Cs*sysdata*2F&type=code__;JSslKyUlJSUlKyUlJSUlJSUlJSol!!PDiH4ENfjr2_Jw!DixK39DPLqlWQMJxs1qWMUez_lKjlOQbfLYCjerS7aGjLJaS9kOaI59OJo3zqXYFXxuJrLWUQBJupQTB0mkWwOxORtv-aE8jEmKfdkE$ [github[.]com] You might take a cue from them. Indeed \keyword{internal} is common there. On Thu, Mar 20, 2025 at 9:57 AM Kevin R. Coombes wrote: > If it is *only *in sysdata.Rda, then it is accessible to your package > code but is not available to users. (They can't, for example, use the > "data" function to load it themselves.) So, there is no reason to > document it. Just like there is no reason to document functions in your > R scripts that were not exported into user space. Of course, you can > document those functions by using the keyword "internal" in an Rd file. > I suspect that this would work to document your internal data set as well. > > On 3/20/2025 12:47 PM, Lists wrote: > > Dear Jeff > > > > I am afraid that does not work if the data file is in sysdata.rda. I > > had to remove my existing Rd file to get the package to pass checks. > > > > Michael > > > > On 20/03/2025 15:15, Jeff Newmiller wrote: > >> Did you seriously look for instructions and not find [1]? And why do > >> you think the answer should not involve Rd files? Documentation in R > >> packages is what Rd files are for. > >> > >> If you don't want to mess with Rd files then you have no choice but > >> to use something like the Roxygen package to mess with them for > >> you... but that just kicks the can down the road .. Rd files are > >> always involved. > >> > >> [1] > >> > https://urldefense.com/v3/__https://cran.r-project.org/doc/manuals/r-devel/R-exts.html*Documenting-data-sets__;Iw!!PDiH4ENfjr2_Jw!DixK39DPLqlWQMJxs1qWMUez_lKjlOQbfLYCjerS7aGjLJaS9kOaI59OJo3zqXYFXxuJrLWUQBJupQTB0mkWwOxORtv-aE8jRJdTNWY$ > [cran[.]r-project[.]org] > >> > >> On March 20, 2025 7:39:39 AM PDT, Lists > wrote: > >>> I want to put a look-up table into sysdata.rda to avoid having to > >>> compute it everytime. At the moment I create it and save the > >>> resulting file and then manually copy it to sysdata.rda. This works > >>> but the package now contains no documentation about the look-up table. > >>> > >>> Most of the information which I turned up online involves doing it > >>> all indirectly using various packages. I do not want to do that, I > >>> am quite happy editing files by hand and moving them to where I want > >>> them by hand. So what I need is to know where I should put the > >>> documentation and what format it should be assuming it is not an Rd > >>> file. > >>> > >>> Of course what I want may be impossible and I just need to document > >>> it in the script which creates it but that seems messy. > >>> > >>> Michael Dewey > >>> > >>> __ > >>> R-package-devel@r-project.org mailing list > >>> https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-package-devel__;!!PDiH4ENfjr2_Jw!DixK39DPLqlWQMJxs1qWMUez_lKjlOQbfLYCjerS7aGjLJaS9kOaI59OJo3zqXYFXxuJrLWUQBJupQTB0mkWwOxORtv-aE8jlzZPbMU$ > >>> [stat[.]ethz[.]ch] > >> > > > > __ > > R-package-devel@r-project.org mailing list > > https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-package-devel__;!!PDiH4ENfjr2_Jw!DixK39DPLqlWQMJxs1qWMUez_lKjlOQbfLYCjerS7aGjLJaS9kOaI59OJo3zqXYFXxuJrLWUQBJupQTB0mkWwOxORtv-aE8jlzZPbMU$ > > [stat[.]ethz[.]ch] > > [[alternative HTML version deleted]] > > __ > R-package-devel@r-project.org mailing list > https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-package-devel__;!!PDiH4ENfjr2_Jw!DixK39DPLqlWQMJxs1qWMUez_lKjlOQbfLYCjerS7aGjLJaS9kOaI59OJo3zqXYFXxuJrLWUQBJupQTB0mkWwOxORtv-aE8jlzZPbMU$ > [stat[.]ethz[.]ch] > [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-package-devel__;!!PDiH4ENfjr2_Jw!DixK39DPLqlWQMJxs1qWMUez_lKjlOQbfLYCjerS7aGjLJaS9kOaI59OJo3zqXYFXxuJrLWUQBJupQTB0mkWwOxORtv-aE8jlzZPbMU$ [stat[.]ethz[.]ch] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/l