Re: [Rd] Undocumented functions
One easy way is to list the undocumented files in pkg-internal.Rd. From the Writing R Extensions manual: Note that all user-level objects in a package should be documented; if a package pkg contains user-level objects which are for “internal” use only, it should provide a file pkg-internal.Rd which documents all such objects, and clearly states that these are not meant to be called by the user. See e.g. the sources for package *grid* in the R distribution for an example. Probably a perverse use of this facility, but it works, and will even allow the package to pass check. David Scott On 16/12/2011 1:01 a.m., Nicola Sturaro Sommacal wrote: Hi! I am building a package. This package will not submitted to CRAN. I write the help files for the most important functions of my package, I cannot write it for all functions. This may sounds strange, but so there! I know that all user-level functions should be documented, so I have to move my undocumented functions to a non-user-level. It's right? To move my functions to a non-user-level I can write them as hidden functions, with a dot before the names. This require a very long check of my code to change the call to the function preceding it by a dot. So, this is not a real choice. There are other way to reach my purpose? Thank you very much for help. Sincerely, Nicola [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- _ David Scott Department of Statistics The University of Auckland, PB 92019 Auckland 1142,NEW ZEALAND Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055 Email: d.sc...@auckland.ac.nz, Fax: +64 9 373 7018 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Undocumented functions
David Scott d.sc...@auckland.ac.nz on Fri, 16 Dec 2011 22:51:11 +1300 writes: One easy way is to list the undocumented files in pkg-internal.Rd. From the Writing R Extensions manual: Note that all user-level objects in a package should be documented; if a package pkg contains user-level objects which are for “internal” use only, it should provide a file pkg-internal.Rd which documents all such objects, and clearly states that these are not meant to be called by the user. See e.g. the sources for package *grid* in the R distribution for an example. Probably a perverse use of this facility, but it works, and will even allow the package to pass check. David Scott Excuse me David, but I think the above actually is pre-R-2.14.x advice. Now that every (installed) package has a NAMESPACE anyway, package authors really should use a NAMESPACE themselves (instead of the auto-generated at installation-time one) and export the non-internal function Martin On 16/12/2011 1:01 a.m., Nicola Sturaro Sommacal wrote: Hi! I am building a package. This package will not submitted to CRAN. I write the help files for the most important functions of my package, I cannot write it for all functions. This may sounds strange, but so there! I know that all user-level functions should be documented, so I have to move my undocumented functions to a non-user-level. It's right? To move my functions to a non-user-level I can write them as hidden functions, with a dot before the names. This require a very long check of my code to change the call to the function preceding it by a dot. So, this is not a real choice. There are other way to reach my purpose? Thank you very much for help. Sincerely, Nicola -- _ David Scott Department of Statistics The University of Auckland, PB 92019 Auckland 1142, NEW ZEALAND Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055 Email: d.sc...@auckland.ac.nz, Fax: +64 9 373 7018 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Undocumented functions
Thanks to all! Nicola 2011/12/16 Martin Maechler maech...@stat.math.ethz.ch David Scott d.sc...@auckland.ac.nz on Fri, 16 Dec 2011 22:51:11 +1300 writes: One easy way is to list the undocumented files in pkg-internal.Rd. From the Writing R Extensions manual: Note that all user-level objects in a package should be documented; if a package pkg contains user-level objects which are for internal use only, it should provide a file pkg-internal.Rd which documents all such objects, and clearly states that these are not meant to be called by the user. See e.g. the sources for package *grid* in the R distribution for an example. Probably a perverse use of this facility, but it works, and will even allow the package to pass check. David Scott Excuse me David, but I think the above actually is pre-R-2.14.x advice. Now that every (installed) package has a NAMESPACE anyway, package authors really should use a NAMESPACE themselves (instead of the auto-generated at installation-time one) and export the non-internal function Martin On 16/12/2011 1:01 a.m., Nicola Sturaro Sommacal wrote: Hi! I am building a package. This package will not submitted to CRAN. I write the help files for the most important functions of my package, I cannot write it for all functions. This may sounds strange, but so there! I know that all user-level functions should be documented, so I have to move my undocumented functions to a non-user-level. It's right? To move my functions to a non-user-level I can write them as hidden functions, with a dot before the names. This require a very long check of my code to change the call to the function preceding it by a dot. So, this is not a real choice. There are other way to reach my purpose? Thank you very much for help. Sincerely, Nicola -- _ David Scott Department of Statistics The University of Auckland, PB 92019 Auckland 1142, NEW ZEALAND Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055 Email: d.sc...@auckland.ac.nz, Fax: +64 9 373 7018 [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Undocumented functions
Hi! I am building a package. This package will not submitted to CRAN. I write the help files for the most important functions of my package, I cannot write it for all functions. This may sounds strange, but so there! I know that all user-level functions should be documented, so I have to move my undocumented functions to a non-user-level. It's right? To move my functions to a non-user-level I can write them as hidden functions, with a dot before the names. This require a very long check of my code to change the call to the function preceding it by a dot. So, this is not a real choice. There are other way to reach my purpose? Thank you very much for help. Sincerely, Nicola [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Undocumented functions
Nicola Sturaro Sommacal mailinglist at nicolasturaro.com writes: Hi! I am building a package. This package will not submitted to CRAN. I write the help files for the most important functions of my package, I cannot write it for all functions. This may sounds strange, but so there! I know that all user-level functions should be documented, so I have to move my undocumented functions to a non-user-level. It's right? To move my functions to a non-user-level I can write them as hidden functions, with a dot before the names. This require a very long check of my code to change the call to the function preceding it by a dot. So, this is not a real choice. There are other way to reach my purpose? Read about name spaces; search for NAMESPACE or name space in the R extensions manual. Any function that is not exported from a package need not be documented. Ben Bolker __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Undocumented functions
Use namespaces and only export the functions at the user level. The rest will be hidden in the namespace and doesn't require a help page. See 'Package Namespaces' in the manual Writing R Extensions. Cheers On Thu, Dec 15, 2011 at 1:01 PM, Nicola Sturaro Sommacal mailingl...@nicolasturaro.com wrote: Hi! I am building a package. This package will not submitted to CRAN. I write the help files for the most important functions of my package, I cannot write it for all functions. This may sounds strange, but so there! I know that all user-level functions should be documented, so I have to move my undocumented functions to a non-user-level. It's right? To move my functions to a non-user-level I can write them as hidden functions, with a dot before the names. This require a very long check of my code to change the call to the function preceding it by a dot. So, this is not a real choice. There are other way to reach my purpose? Thank you very much for help. Sincerely, Nicola [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Joris Meys Statistical consultant Ghent University Faculty of Bioscience Engineering Department of Mathematical Modelling, Statistics and Bio-Informatics tel : +32 9 264 59 87 joris.m...@ugent.be --- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Undocumented functions
Why not use package.skeleton() to construct empty help files? But if you're determined to change the function names instead, grep and sed are very useful tools for that sort of thing. (The OS versions, not the R grep()). Sarah On Thu, Dec 15, 2011 at 7:01 AM, Nicola Sturaro Sommacal mailingl...@nicolasturaro.com wrote: Hi! I am building a package. This package will not submitted to CRAN. I write the help files for the most important functions of my package, I cannot write it for all functions. This may sounds strange, but so there! I know that all user-level functions should be documented, so I have to move my undocumented functions to a non-user-level. It's right? To move my functions to a non-user-level I can write them as hidden functions, with a dot before the names. This require a very long check of my code to change the call to the function preceding it by a dot. So, this is not a real choice. There are other way to reach my purpose? Thank you very much for help. Sincerely, Nicola -- Sarah Goslee http://www.functionaldiversity.org __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel