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

Roberts, David drobert@ @end|ng |rom mont@n@@edu
Wed Jan 15 20:26:46 CET 2020


Thanks Iñaki.  I was unaware of rhub.  Nice tool!  Unfortunately, their 
debian machine odes not reproduce the error.  I have written the R 
Submission crew to see if I can submit a package with a 
print(str(mss.10)) call to see the output in the examples log, or if 
that is an abuse of CRAN submission.  We'll see what they say.

Thanks again for your help, Dave

On 1/15/20 7:42 PM, Iñaki Ucar wrote:
> 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
> 

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David W. Roberts
Professor
Department of Ecology, Montana State University
On sabbatical at:
Swiss Federal Research Institute WSL,
Zuercherstrasse 111
CH-8903 Birmensdorf, Switzerland


More information about the R-package-devel mailing list