[R-pkg-devel] error in sample(), invalid 'size' argument

Iñaki Ucar |uc@r @end|ng |rom |edor@project@org
Wed Jan 15 19:42:09 CET 2020


On Wed, 15 Jan 2020 at 19:26, Roberts, David <droberts using 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



More information about the R-package-devel mailing list