Message-ID: <CALEXWq0Lr4K4xJ3K0Ds1CmG=buk5A2qQ6OMkSpwaU7NWWtGeeQ@mail.gmail.com>
Date: 2020-01-15T18:42:09Z
From: IƱaki Ucar
Subject: [R-pkg-devel] error in sample(), invalid 'size' argument
In-Reply-To: <18065ef0-b016-f0a5-d9e2-fd1a6fc50918@montana.edu>
On Wed, 15 Jan 2020 at 19:26, Roberts, David <droberts at montana.edu> wrote:
>
> Dear Bill, Dear I?aki,
>
> Thank you both; I'm confident that you are right. I realized a list
> or data.frame would generate that error message, but I did not know that
> NULL would also do so.
>
> This means the the error occurred in the previous function call
> which produced an output object that lacked the matrix expected at
> $member. As I?aki well notes, the existence of an object of the correct
> class doesn't guarantee it is well-formed. On my machine (and those I
> have access to), str(mss) returns
>
> List of 7
> $ musubx : num [1:78, 1:10] 1 1 1 1 1 1 1 1 1 1 ...
> $ member : int [1:78, 1:10] 1 2 3 4 5 6 8 9 10 11 ...
> $ numset : int 78
> $ size : num 10
> $ alphac : NULL
> $ distname: chr "dis.bc"
> $ numele : int 150
> - attr(*, "class")= chr "mss"
> - attr(*, "call")= language maxsimset(dist = dis.bc, size = 10)
> - attr(*, "timestamp")= chr "Wed Jan 15 19:15:33 2020"
>
> where clearly $member is a matrix with 10 columns.
>
> Unfortunately, I cannot generate the error on any machines I have
> access to and will have to find a debian machine running R-devel to do
> any debugging.
I would try the Debian machines on rhub: they should be pretty up to
date with the CRAN configuration, and if you can reproduce the error
there, then you can test a more verbose output without importuning
CRAN, or you could even run those configurations and investigate
locally using rhub's dockerfiles.
I?aki