Re: [R-pkg-devel] Warning when the --as-cran flag is used, not otherwise.

2024-01-16 Thread David Winsemius
Speaking as a potential user of such a package, I wonder if that 
information could be put in a help page for the entire package? I've 
seen several packages that do such a "global" overview. I realize there 
might be a Suggests: entry in the DESCRIPTION file but not everyone 
knows how to find it and even those who do might first try for a help 
page if it was in the Index.


On 1/16/24 22:39, Rolf Turner wrote:

On Tue, 16 Jan 2024 23:53:15 +0100
Sebastian Meyer  wrote:


There is a note on your help page that says

These data are **not** immediately available in the `eglhmm` package.

which seems to be in line with the check warning.

OK.  Thanks.  Now that you have pointed this out, it's all too obvious.
The user is invited to install the monoCyteSim package (from a specified
github repository).  After the user has done so, then the data sets
bivarSim and ccSim are available in the usual way.

When I ran R CMD check without the --as-cran flag, there was no problem
because I had already installed the monoCyteSim package on my local
computer.  *With* that flag, R CMD check carries on as if it were
looking at the eghlmm package in the context of running on a CRAN
server.  This server would *not* have the monoCyteSim package
installed, whence it would not be able to find the data sets bivarSim
and ccCM, whence the warning.  Makes perfect sense now.

It turns out I can make the warning go away by removing the lines

\usage{
 bivarSim
 ccSim
}

They serve no useful purpose and are not required.

Thanks again.

cheers,

Rolf Turner



__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Warning when the --as-cran flag is used, not otherwise.

2024-01-16 Thread Rolf Turner


On Tue, 16 Jan 2024 23:53:15 +0100
Sebastian Meyer  wrote:

> There is a note on your help page that says
> 
> These data are **not** immediately available in the `eglhmm` package.
> 
> which seems to be in line with the check warning.

OK.  Thanks.  Now that you have pointed this out, it's all too obvious.
The user is invited to install the monoCyteSim package (from a specified
github repository).  After the user has done so, then the data sets
bivarSim and ccSim are available in the usual way.

When I ran R CMD check without the --as-cran flag, there was no problem
because I had already installed the monoCyteSim package on my local
computer.  *With* that flag, R CMD check carries on as if it were
looking at the eghlmm package in the context of running on a CRAN
server.  This server would *not* have the monoCyteSim package
installed, whence it would not be able to find the data sets bivarSim
and ccCM, whence the warning.  Makes perfect sense now.

It turns out I can make the warning go away by removing the lines

\usage{
bivarSim
ccSim
}

They serve no useful purpose and are not required.

Thanks again.

cheers,

Rolf Turner

-- 
Honorary Research Fellow
Department of Statistics
University of Auckland
Stats. Dep't. (secretaries) phone:
 +64-9-373-7599 ext. 89622
Home phone: +64-9-480-4619

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Warning when the --as-cran flag is used, not otherwise.

2024-01-16 Thread Sebastian Meyer
There is a note on your help page that says

These data are **not** immediately available in the `eglhmm` package.

which seems to be in line with the check warning.

Best wishes,
Sebastian Meyer

Am 16. Januar 2024 23:13:22 MEZ schrieb Rolf Turner :
>
>In a package that I am updating, I have a data documentation file
>monoCyteSim.Rd.  In this file, two data sets are documented: bivarSim
>and ccSim.  The usage section is;
>
>> \usage{
>> bivarSim
>> ccSim
>> }
>
>Since the data are lazy-loaded I *don't* wrap the names of the data
>sets in "data()".
>
>I do this in another data documentation file (SydColDat.Rd) without
>problem. However when I check the package using --as-cran I get a
>warning:
>
>> * checking for code/documentation mismatches ... WARNING
>> Variables with usage in documentation object 'monoCyteSim' but not in
>> code: ‘bivarSim’ ‘ccSim’
>
>No such warning seems to arise in respect of SydColDat.Rd.
>
>Can anyone explain what is going on, and what if anything I can do
>about it?  I would be grateful for any insight.
>
>I have attached the two help files, the one that triggers the
>warning and the one that doesn't.  I have changed the extension from
>.Rd to .txt so that (I hope!) the mailer doesn't strip them away.
>
>The complete package, as it currently stands (if this is of any
>interest), is available from my web page:
>
>https://www.stat.auckland.ac.nz/~rolf/
>
>Scroll to near the bottom and click on "Eglhmm".
>
>Thanks.
>
>cheers,
>
>Rolf Turner
>

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Warning when the --as-cran flag is used, not otherwise.

2024-01-16 Thread Rolf Turner

In a package that I am updating, I have a data documentation file
monoCyteSim.Rd.  In this file, two data sets are documented: bivarSim
and ccSim.  The usage section is;

> \usage{
> bivarSim
> ccSim
> }

Since the data are lazy-loaded I *don't* wrap the names of the data
sets in "data()".

I do this in another data documentation file (SydColDat.Rd) without
problem. However when I check the package using --as-cran I get a
warning:

> * checking for code/documentation mismatches ... WARNING
> Variables with usage in documentation object 'monoCyteSim' but not in
> code: ‘bivarSim’ ‘ccSim’

No such warning seems to arise in respect of SydColDat.Rd.

Can anyone explain what is going on, and what if anything I can do
about it?  I would be grateful for any insight.

I have attached the two help files, the one that triggers the
warning and the one that doesn't.  I have changed the extension from
.Rd to .txt so that (I hope!) the mailer doesn't strip them away.

The complete package, as it currently stands (if this is of any
interest), is available from my web page:

https://www.stat.auckland.ac.nz/~rolf/

Scroll to near the bottom and click on "Eglhmm".

Thanks.

cheers,

Rolf Turner

-- 
Honorary Research Fellow
Department of Statistics
University of Auckland
Stats. Dep't. (secretaries) phone:
 +64-9-373-7599 ext. 89622
Home phone: +64-9-480-4619
\name{monoCyteSim}
\alias{monoCyteSim}
\alias{bivarSim}
\alias{ccSim}
\docType{data}
\title{
Simulated monocyte counts and psychosis symptoms.
}
\usage{
bivarSim
ccSim
}
\description{
Discretised values of monocyte counts, and ratings of level of
psychosis simulated from a model fitted to a data set consisting of
observations made on a number of patients from the Northland District
Health Board system.  The real data must be kept confidential due
to ethics constraints.
}
\section{Note}{
These data are \bold{not} immediately available in the \code{eglhmm}
package.  Their presence would cause the size of the \code{data}
directory to exceed 4.5 Mb., which is unacceptably large.
Consequently these data sets have been placed in a separate
\dQuote{data only} package called \code{monoCyteSim}, which is
available from \code{github}.  This package may be obtained by
executing the command:
\preformatted{
install.packages("monoCyteSim",repos="https://rolfturner.r-universe.dev;)
}
After having installed the \code{monoCyteSim} package, you may load
it via \code{library(monoCyteSim)} and then access the data sets
in the usual way, e.g. \code{X <- ccSim}.

Alternatively (after having installed the \code{monoCyteSim}
package) you may use the \code{::} syntax to access a single data
set, e.g. \code{X <- monoCyteSim::ccSim}.

You can access the documentation via, e.g., \code{?monoCyteSim::ccSim}.
}
\keyword{datasets}
\name{SydColDat}
\alias{SydColCount}
\alias{SydColDisc}
\docType{data}
\title{Sydney coliform bacteria data}
\description{
   Transformed counts of faecal coliform bacteria in sea water
   at seven locations: Longreef, Bondi East, Port Hacking ``50'',
   and Port Hacking ``100'' (controls) and Bondi Offshore, Malabar
   Offshore and North Head Offshore (outfalls).  At each location
   measurements were made at four depths: 0, 20, 40, and 60 meters.
}
\usage{
   SydColCount
   SydColDisc
}
\format{
  Data frames with 5432 observations on the following 6 variables.
  \describe{
\item{\code{y}}{Transformed measures of the number of faecal
coliform count bacteria in a sea-water sample of some specified
volume.  The original measures were obtained by a repeated
dilution process.

For \code{SydColCount} the transformation used was essentially
a square root transformation, resulting values greater than 150
being set to \code{NA}.  The results are putatively compatible
with a Poisson model for the emission probabilities.

For \code{SydColDisc} the data were discretised
using the \code{cut()} function with breaks given
by \code{c(0,1,5,25,200,Inf)} and labels equal to
\code{c("lo","mlo","m","mhi","hi")}.}

Note that in the \code{SydColDisc} data there are 180 fewer
missing values (\code{NA}s) in the \code{y} column than in
the \code{SydColCount} data.  This is because in forming
the \code{SydColCount} data (transforming the original data
to a putative Poisson distribution) values that were greater
than 150 were set equal to \code{NA}, and there were 180 such
values.

\item{\code{locn}}{a factor with levels \dQuote{LngRf}
(Longreef), \dQuote{BondiE} (Bondi East), \dQuote{PH50}
(Port Hacking 50), \dQuote{PH100}  (Port Hacking 100),
\dQuote{BondiOff} (Bondi Offshore), \dQuote{MlbrOff} (Malabar
Offshore) and \dQuote{NthHdOff} (North Head Offshore)}

\item{\code{depth}}{a factor with levels \dQuote{0} (0 metres),
\dQuote{20} (20 metres), \dQuote{40} (40 metres) and \dQuote{60}
(60 metres).}

\item{\code{ma.com}}{A factor with levels \code{no}