Dear All, I am trying to built for the first time a package. I am following this tutorial: https://support.rstudio.com/hc/en-us/articles/200486488-Developing-Packages-with-RStudio I create a new Project (package) and I added 44 .R sources files (functions). After, I got error message when I built and reload the project (please, see bellow). Any suggestion? I need to fill the doc informations (title, manual, vignette, description). Can I do these directly from Rd files located in Man folder? Thanks! Karim #####00install.out############ * installing *source* package ?CanceR? ... ** R ** preparing package for lazy loading ** help Warning: /home/mezhoud/CGDS-R/CanceR.Rcheck/00_pkg_src/CanceR/man/CanceR-package.Rd:33: All text must be in a section Warning: /home/mezhoud/CGDS-R/CanceR.Rcheck/00_pkg_src/CanceR/man/CanceR-package.Rd:34: All text must be in a section Warning: /home/mezhoud/CGDS-R/CanceR.Rcheck/00_pkg_src/CanceR/man/CanceR-package.Rd:35: All text must be in a section *** installing help indices Error in Rd_info(db[[i]]) : missing/empty \title field in '/home/mezhoud/CGDS-R/CanceR.Rcheck/00_pkg_src/CanceR/man/CanceR.Rd' Rd files must have a non-empty \title. See chapter 'Writing R documentation' in manual 'Writing R Extensions'. * removing ?/home/mezhoud/CGDS-R/CanceR.Rcheck/CanceR? ###CanceR-package.Rd ################# \name{CanceR-package} \alias{CanceR-package} \alias{CanceR} \docType{package} \title{ What the package does (short line) ~~ package title ~~ } \description{ More about what it does (maybe more than one line) ~~ A concise (1-5 lines) description of the package ~~ } \details{ \tabular{ll}{ Package: \tab CanceR\cr Type: \tab Package\cr Version: \tab 1.0\cr Date: \tab 2014-08-26\cr License: \tab What license is it under?\cr } ~~ An overview of how to use the package, ~~ ~~ including the most important functions ~~ } \author{ Who wrote it Maintainer: Who to complain to <yourfault at somewhere.net> ~~ The author and/or maintainer of the package ~~ } \references{ ~~ Literature or other references for background information ~~ } ~~ Optionally other standard keywords, ~~ ~~ one per line, from file KEYWORDS in ~~ ~~ the R documentation directory ~~ \keyword{ package } \seealso{ ~~ Optional links to other man pages, e.g. ~~ ~~ \code{\link[<pkg>:<pkg>-package]{<pkg>}} ~~ } \examples{ ~~ simple examples of the most important functions ~~ } [[alternative HTML version deleted]]
Jeff Newmiller
2014-Aug-26 21:31 UTC
[R] buit a package using Rstudio and existing R files
I would suggest building your first package with as few functions as you can (one?). Once you get that working, try adding more functions and keep rebuilding as you go so the error messages don't drown you. In any event, your immediate problem is that CanceR-package.Rd has not been properly edited. You should take the advice given in your error message and read the Writing R Extensions manual. While there are some shortcuts such as roxygen to creating the required files, when things go wrong the errors will generally be about files that are documented in the WRE document. You should also read the Posting Guide which among other things mentions that this is a plain text mailing list. We are more likely to be able to decipher your email if you don't let your email program format it as HTML. --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity. On August 26, 2014 11:45:07 AM PDT, Karim Mezhoud <kmezhoud at gmail.com> wrote:>Dear All, >I am trying to built for the first time a package. I am following this >tutorial: >https://support.rstudio.com/hc/en-us/articles/200486488-Developing-Packages-with-RStudio > >I create a new Project (package) and I added 44 .R sources files >(functions). >After, I got error message when I built and reload the project (please, >see >bellow). > >Any suggestion? > >I need to fill the doc informations (title, manual, vignette, >description). >Can I do these directly from Rd files located in Man folder? >Thanks! > >Karim > >#####00install.out############ >* installing *source* package ?CanceR? ... >** R >** preparing package for lazy loading >** help >Warning: >/home/mezhoud/CGDS-R/CanceR.Rcheck/00_pkg_src/CanceR/man/CanceR-package.Rd:33: >All text must be in a section >Warning: >/home/mezhoud/CGDS-R/CanceR.Rcheck/00_pkg_src/CanceR/man/CanceR-package.Rd:34: >All text must be in a section >Warning: >/home/mezhoud/CGDS-R/CanceR.Rcheck/00_pkg_src/CanceR/man/CanceR-package.Rd:35: >All text must be in a section >*** installing help indices >Error in Rd_info(db[[i]]) : > missing/empty \title field in >'/home/mezhoud/CGDS-R/CanceR.Rcheck/00_pkg_src/CanceR/man/CanceR.Rd' >Rd files must have a non-empty \title. >See chapter 'Writing R documentation' in manual 'Writing R Extensions'. >* removing ?/home/mezhoud/CGDS-R/CanceR.Rcheck/CanceR? > >###CanceR-package.Rd ################# > >\name{CanceR-package} >\alias{CanceR-package} >\alias{CanceR} >\docType{package} >\title{ >What the package does (short line) >~~ package title ~~ >} >\description{ >More about what it does (maybe more than one line) >~~ A concise (1-5 lines) description of the package ~~ >} >\details{ >\tabular{ll}{ >Package: \tab CanceR\cr >Type: \tab Package\cr >Version: \tab 1.0\cr >Date: \tab 2014-08-26\cr >License: \tab What license is it under?\cr >} >~~ An overview of how to use the package, ~~ >~~ including the most important functions ~~ >} >\author{ >Who wrote it > >Maintainer: Who to complain to <yourfault at somewhere.net> >~~ The author and/or maintainer of the package ~~ >} >\references{ >~~ Literature or other references for background information ~~ >} >~~ Optionally other standard keywords, ~~ >~~ one per line, from file KEYWORDS in ~~ >~~ the R documentation directory ~~ >\keyword{ package } >\seealso{ >~~ Optional links to other man pages, e.g. ~~ >~~ \code{\link[<pkg>:<pkg>-package]{<pkg>}} ~~ >} >\examples{ >~~ simple examples of the most important functions ~~ >} > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.