[R-pkg-devel] Inquiry
On Mon, 26 Sep 2022 20:07:28 -0400
Andrew Simmons <akwsimmo at gmail.com> wrote:
This issue isn't related to RStudio. The issue is that you're exporting an object without providing any documentation for it. It sounds like you don't want to export it, so you need to go to your NAMESPACE file and remove the part was export(r2). If you do want to export it, then you need to document it, there's no way around that. The documentation doesn't need to be very detailed. On Mon., Sep. 26, 2022, 20:01 , <teimouri at aut.ac.ir> wrote:
?Hi there, I am writing to aks your help for an issuue arising when I am writing my R package using R studio 1.2.1335 as follows. ``checking for missing documentation entries ... WARNING Undocumented code objects: 'r2' All user-level objects in a package should have documentation entries." The function r2.r is among .r files within R folder of my package. I am not interested to present "r2" in the R topics documented: as a part of first page of built pdf help file of my package. I appreciate highly if you could help me to solve this issue.
My understanding is that functions, that are not meant to be called directly by users, should be documented in a file named <pkgnm>-internal.Rd. It should have a structure something like:
\name{pkgnm-internal}
\alias{pkgnm-internal}
\alias{foo}
\alias{bar}
\alias{clyde}
\title{Internal pkgnm functions}
\description{
Internal pkgnm functions.
}
\usage{
foo(x,y,z)
bar(melvin,irving,...)
clyde(arrgh)
}
\details{
These functions are not intended to be called directly by the
user.
}
\author{Hoo Hee
\email{hoo.hee at somewhere.otr}
}
\keyword{internal}
Then if someone types, e.g., "help(clyde)" they get the processed form of the forgoing *.Rd file displayed, and are thereby told that they probably should not mess with clyde(). cheers, Rolf Turner P.S. I always export everything. R. T.
Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276