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

2020-01-15 Thread Roberts, David
Colleagues,

I have a function (maxsimset) in package optpart that has worked for 
at least a decade, passes check --as-cran on my ubuntu-based system, and 
builds without errors at win-builder and CRAN windows, but fails at CRAN 
debian (unstable) with the error

 > mss.test(mss.10,shoshsite$elevation)
Error in sample.int(length(x), size, replace, prob) :
   invalid 'size' argument
Calls: mss.test -> sample -> sample.int

an excerpt of the function is below

  1  mss.test <- function(mss,env,panel='all',
  2  main=deparse(substitute(env)),...)
  3  {
  4  if (class(mss) != "mss") {
  5  stop("You must pass an object of class mss ...")
  6  }
  7  if (!is.numeric(env)) {
  8  stop("You must pass only numeric vectors ... ")
  9  }
10  setsiz <- ncol(mss$member)
11  nset <- mss$numset
12  null <- rep(0,nset)
13  for (i in 1:nset) {
14  tmp <- sample(1:length(env),setsiz)
15  nullmin <- min(env[tmp])
16  nullmax <- max(env[tmp])
17  null[i] <- nullmax - nullmin
18  }
19 . .  .
20 . .  .
21 . .  .
22  }

The error occurs at line 14 in the excerpt above.  As you can see, the 
'size' argument is setsiz, taken at line 10 as the ncol(mss$member); mss 
has already been checked for conformance and does indeed have a list 
object matrix called $member.  In my tests, setsiz has mode numeric, 
class integer, and size 1 as expected.  The specific error message I 
receive can be generated from sample() if size is a list object or 
data.frame, but not a vector or matrix.

Since I cannot replicate the error on any machines I have access to, I 
am at a loss for the reason behind the error.  If this should go to 
R-devel with respect to r77656 ( 2020-01-12) please advise.

Thanks in advance for any help, Dave
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


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

2020-01-15 Thread Iñaki Ucar
On Wed, 15 Jan 2020 at 13:58, Roberts, David  wrote:
>
> Colleagues,
>
> I have a function (maxsimset) in package optpart that has worked for
> at least a decade, passes check --as-cran on my ubuntu-based system, and
> builds without errors at win-builder and CRAN windows, but fails at CRAN
> debian (unstable) with the error
>
>  > mss.test(mss.10,shoshsite$elevation)
> Error in sample.int(length(x), size, replace, prob) :
>invalid 'size' argument
> Calls: mss.test -> sample -> sample.int
>
> an excerpt of the function is below
>
>   1  mss.test <- function(mss,env,panel='all',
>   2  main=deparse(substitute(env)),...)
>   3  {
>   4  if (class(mss) != "mss") {

Not related to the issue, but please use "inherits" instead.

>   5  stop("You must pass an object of class mss ...")
>   6  }
>   7  if (!is.numeric(env)) {
>   8  stop("You must pass only numeric vectors ... ")
>   9  }
> 10  setsiz <- ncol(mss$member)
> 11  nset <- mss$numset
> 12  null <- rep(0,nset)
> 13  for (i in 1:nset) {
> 14  tmp <- sample(1:length(env),setsiz)
> 15  nullmin <- min(env[tmp])
> 16  nullmax <- max(env[tmp])
> 17  null[i] <- nullmax - nullmin
> 18  }
> 19 . .  .
> 20 . .  .
> 21 . .  .
> 22  }
>
> The error occurs at line 14 in the excerpt above.  As you can see, the
> 'size' argument is setsiz, taken at line 10 as the ncol(mss$member); mss
> has already been checked for conformance

No, it has not. Nothing stops you from changing the contents of a S3
object, so just verifying the class is not a conformance check.

> and does indeed have a list object matrix called $member.

What do you mean by "list object matrix"?

> In my tests, setsiz has mode numeric,
> class integer, and size 1 as expected.  The specific error message I
> receive can be generated from sample() if size is a list object or
> data.frame, but not a vector or matrix.

My guess is that, in some call, you got an unintended simplification
when assigning $member. For any object without a "dim" attribute,
ncol(object) is NULL. And a NULL size in sample() raises such an
error.

Iñaki

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


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

2020-01-15 Thread William Dunlap
If mss$member is not a matrix you will get that error because setsiz will
be NULL.

  > setsiz <- ncol( 33 )
  > sample(1:3, setsiz)
  Error in sample.int(length(x), size, replace, prob) :
invalid 'size' argument


Bill Dunlap
TIBCO Software
wdunlap tibco.com


On Wed, Jan 15, 2020 at 4:58 AM Roberts, David  wrote:

> Colleagues,
>
> I have a function (maxsimset) in package optpart that has worked for
> at least a decade, passes check --as-cran on my ubuntu-based system, and
> builds without errors at win-builder and CRAN windows, but fails at CRAN
> debian (unstable) with the error
>
>  > mss.test(mss.10,shoshsite$elevation)
> Error in sample.int(length(x), size, replace, prob) :
>invalid 'size' argument
> Calls: mss.test -> sample -> sample.int
>
> an excerpt of the function is below
>
>   1  mss.test <- function(mss,env,panel='all',
>   2  main=deparse(substitute(env)),...)
>   3  {
>   4  if (class(mss) != "mss") {
>   5  stop("You must pass an object of class mss ...")
>   6  }
>   7  if (!is.numeric(env)) {
>   8  stop("You must pass only numeric vectors ... ")
>   9  }
> 10  setsiz <- ncol(mss$member)
> 11  nset <- mss$numset
> 12  null <- rep(0,nset)
> 13  for (i in 1:nset) {
> 14  tmp <- sample(1:length(env),setsiz)
> 15  nullmin <- min(env[tmp])
> 16  nullmax <- max(env[tmp])
> 17  null[i] <- nullmax - nullmin
> 18  }
> 19 . .  .
> 20 . .  .
> 21 . .  .
> 22  }
>
> The error occurs at line 14 in the excerpt above.  As you can see, the
> 'size' argument is setsiz, taken at line 10 as the ncol(mss$member); mss
> has already been checked for conformance and does indeed have a list
> object matrix called $member.  In my tests, setsiz has mode numeric,
> class integer, and size 1 as expected.  The specific error message I
> receive can be generated from sample() if size is a list object or
> data.frame, but not a vector or matrix.
>
> Since I cannot replicate the error on any machines I have access to, I
> am at a loss for the reason behind the error.  If this should go to
> R-devel with respect to r77656 ( 2020-01-12) please advise.
>
> Thanks in advance for any help, Dave
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

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


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

2020-01-15 Thread Roberts, David
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.

Thanks for your help, Dave

On 1/15/20 4:17 PM, William Dunlap wrote:
> If mss$member is not a matrix you will get that error because setsiz 
> will be NULL.
> 
>    > setsiz <- ncol( 33 )
>    > sample(1:3, setsiz)
>    Error in sample.int (length(x), size, replace, 
> prob) :
>      invalid 'size' argument
> 
> 
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com 
> 
> 
> On Wed, Jan 15, 2020 at 4:58 AM Roberts, David  > wrote:
> 
> Colleagues,
> 
>      I have a function (maxsimset) in package optpart that has
> worked for
> at least a decade, passes check --as-cran on my ubuntu-based system,
> and
> builds without errors at win-builder and CRAN windows, but fails at
> CRAN
> debian (unstable) with the error
> 
>   > mss.test(mss.10,shoshsite$elevation)
> Error in sample.int (length(x), size, replace,
> prob) :
>     invalid 'size' argument
> Calls: mss.test -> sample -> sample.int 
> 
> an excerpt of the function is below
> 
>    1  mss.test <- function(mss,env,panel='all',
>    2              main=deparse(substitute(env)),...)
>    3  {
>    4      if (class(mss) != "mss") {
>    5          stop("You must pass an object of class mss ...")
>    6      }
>    7      if (!is.numeric(env)) {
>    8          stop("You must pass only numeric vectors ... ")
>    9      }
> 10      setsiz <- ncol(mss$member)
> 11      nset <- mss$numset
> 12      null <- rep(0,nset)
> 13      for (i in 1:nset) {
> 14          tmp <- sample(1:length(env),setsiz)
> 15          nullmin <- min(env[tmp])
> 16          nullmax <- max(env[tmp])
> 17          null[i] <- nullmax - nullmin
> 18      }
> 19         .     .      .
> 20         .     .      .
> 21         .     .      .
> 22  }
> 
> The error occurs at line 14 in the excerpt above.  As you can see, the
> 'size' argument is setsiz, taken at line 10 as the ncol(mss$member);
> mss
> has already been checked for conformance and does indeed have a list
> object matrix called $member.  In my tests, setsiz has mode numeric,
> class integer, and size 1 as expected.  The specific error message I
> receive can be generated from sample() if size is a list object or
> data.frame, but not a vector or matrix.
> 
> Since I cannot replicate the error on any machines I have access to, I
> am at a loss for the reason behind the error.  If this should go to
> R-devel with respect to r77656 ( 2020-01-12) please advise.
> 
> Thanks in advance for any help, Dave
> __
> R-package-devel@r-project.org 
> mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


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

2020-01-15 Thread Iñaki Ucar
On Wed, 15 Jan 2020 at 19:26, Roberts, David  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

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


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

2020-01-15 Thread Roberts, David
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  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
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Alternatives to R-devel on a Mac for package checking?

2020-01-15 Thread Jonathan Greenberg
One of the issues I'm running into is that it seems every time there's a Mac 
update something gets broken with regards to compilers, making it incredibly 
challenging to get the development install of R working with Rcpp (which is a 
requirement for the packages I need to use to check my packages).

I'd like to start moving towards an easier approach rather than spending days 
fixing various issues on my Mac just to run a simple --as-cran check on a 
package with the latest  r-devel.  I was HOPING there is an up-to-date Docker 
for the r-development 4.0 version out in the wild, but it seems like the rocker 
r-devel is just 3.6.2.  Any ideas?

docker run --rm -ti rocker/r-devel

Alternatively, are there any decent online checkers (except the CRAN ones)?  
r-forge seems to not do r-devel checks anymore.

--j

[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] Alternatives to R-devel on a Mac for package checking?

2020-01-15 Thread Merlise Clyde, Ph.D.
Hi Jonathan,

rocker/r-devel was updated yesterday afternoon (I was able to pull it using 
docker on my mac - tested and it works with gcc 9/gfortran 9) and valgrind

(many thanks to the rockerstars!)

best,
Merlise

Merlise A Clyde
Professor Department of Statistical Science
Duke University
http://stat.duke.edu/~clyde

cl...@duke.edu
919 681 8440





On Jan 15, 2020, at 4:39 PM, Jonathan Greenberg 
mailto:jgreenb...@unr.edu>> wrote:

One of the issues I'm running into is that it seems every time there's a Mac 
update something gets broken with regards to compilers, making it incredibly 
challenging to get the development install of R working with Rcpp (which is a 
requirement for the packages I need to use to check my packages).

I'd like to start moving towards an easier approach rather than spending days 
fixing various issues on my Mac just to run a simple --as-cran check on a 
package with the latest  r-devel.  I was HOPING there is an up-to-date Docker 
for the r-development 4.0 version out in the wild, but it seems like the rocker 
r-devel is just 3.6.2.  Any ideas?

docker run --rm -ti rocker/r-devel

Alternatively, are there any decent online checkers (except the CRAN ones)?  
r-forge seems to not do r-devel checks anymore.

--j

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dpackage-2Ddevel&d=DwICAg&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=NOkxkvdFOOffXzeTY2kgZQ&m=oGJmbsAoNZKb4jPaU6N5uD_efT7bUREy5-CKNu7kg7c&s=XrowfhQmMclrE7WUMhq7ERAk0Df5q02p-pGMB3jDdIM&e=


[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] Proper way to ask a user to set permanent variables?

2020-01-15 Thread Dirk Eddelbuettel


Jonathan,

In all but one (maybe two?) of my packages I found relying on options()
sufficient. I usually follow the somewhat-common pattern of creating a
package-local environment in R/init.R or R/zzz.R. I then fill it with values
reflecting options() (often under a tag starting with the package name)
and/or environment variables, and sometime also provide 'setters' to update
the environment values. That have proven to be both good enough and rather
robust and, as an added benefit, does not depend on anything further.

Cheers, Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


Re: [R-pkg-devel] Alternatives to R-devel on a Mac for package checking?

2020-01-15 Thread Dirk Eddelbuettel


Jonathan,

Rocker should be building weekly r-devel and drd (similar, was meant to be a
littler "lighter", effectively the same) images.

As Merlise noticed, somehow the cronjob push to the Docker Hub build service
started to fail -- this sadly happens once in a while so I manually triggered
a rebuild. They should be good now for 'R 4.0.0 to be'. Remember to invoke it
as 'RD' (for R-Devel) in the image, there is also an r-release as just 'R'.

Your case of "am on mac and need newer stuff" was also encountered last year
by Roger Koenker whom I helped a little bit via a few short emails -- leading
him to go from "zero to hero" with Docker.  We wrote a short blog post on
that which you can find at

  http://dirk.eddelbuettel.com/blog/2019/08/05#023_rocker_debug_example

It's nice as it gives a full rundown of all steps.

Hope this helps,  Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


[R-pkg-devel] How to create a new project on GitHub?

2020-01-15 Thread Spencer Graves

Hello, All:


  How can I create a new project within my GitHub account 
(https://github.com/sbgraves237/)?



  I'm trying to follow "http://r-pkgs.had.co.nz/git.html":


...
Synchronising with GitHub
...

    Open a shell, then follow the instructions on the new repo page. 
They’ll look something like this:


    git remote add origin g...@github.com:hadley/r-pkgs.git
    git push -u origin master

I tried:

...$ git remote add origin g...@github.com:sbgraves237/fda.git
...$ git push -u origin master
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


*** That didn't work, so I tried


...$ git remote add origin https://[my ssh code]@github.com/sbgraves237/fda
fatal: remote origin already exists.
...$ git push -u origin master
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


  *** What do I need to do to fix the mess I seem to have created 
and get what I want?



  *** Thanks, Spencer Graves


p.s.  If you know the fda package, you know that James Ramsay is the 
primary author, and I'm one of his long-time collaborators.  He has a 
new version he wants to clean up and submit to CRAN, and I'm trying to 
help him.  Thanks.  sg


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


Re: [R-pkg-devel] How to create a new project on GitHub?

2020-01-15 Thread Spencer Graves




On 2020-01-15 17:18, Gábor Csárdi wrote:

Seems like you skipped step 1?

"1. Create a new repo on GitHub: https://github.com/new. Give it the
same name as your package, and include the package title as the repo
description. Leave all the other options as is, then click Submit."

Gabor



  Thanks.  I now have "https://github.com/sbgraves237/fda";. Then I 
did "git push --set-upstream origin master", and it seemed to work.



  Thanks again.
  Spencer


On Wed, Jan 15, 2020 at 11:15 PM Spencer Graves
 wrote:

Hello, All:


How can I create a new project within my GitHub account
(https://github.com/sbgraves237/)?


I'm trying to follow "http://r-pkgs.had.co.nz/git.html":


...
Synchronising with GitHub
...

  Open a shell, then follow the instructions on the new repo page.
They’ll look something like this:

  git remote add origin g...@github.com:hadley/r-pkgs.git
  git push -u origin master

I tried:

...$ git remote add origin g...@github.com:sbgraves237/fda.git
...$ git push -u origin master
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


*** That didn't work, so I tried


...$ git remote add origin https://[my ssh code]@github.com/sbgraves237/fda
fatal: remote origin already exists.
...$ git push -u origin master
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


*** What do I need to do to fix the mess I seem to have created
and get what I want?


*** Thanks, Spencer Graves


p.s.  If you know the fda package, you know that James Ramsay is the
primary author, and I'm one of his long-time collaborators.  He has a
new version he wants to clean up and submit to CRAN, and I'm trying to
help him.  Thanks.  sg

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


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


Re: [R-pkg-devel] Alternatives to R-devel on a Mac for package checking?

2020-01-15 Thread Jonathan Greenberg
Awesome -- the key was the "RD", so for me:

docker run -v /Users:/Users --rm -ti rocker/r-devel RD

(where, on a Mac, I was binding my Mac's /Users to the Docker's /Users 
directory)

Thanks, all!

--j

On Wed, Jan 15, 2020 at 2:53 PM Dirk Eddelbuettel 
mailto:e...@debian.org>> wrote:

Jonathan,

Rocker should be building weekly r-devel and drd (similar, was meant to be a
littler "lighter", effectively the same) images.

As Merlise noticed, somehow the cronjob push to the Docker Hub build service
started to fail -- this sadly happens once in a while so I manually triggered
a rebuild. They should be good now for 'R 4.0.0 to be'. Remember to invoke it
as 'RD' (for R-Devel) in the image, there is also an r-release as just 'R'.

Your case of "am on mac and need newer stuff" was also encountered last year
by Roger Koenker whom I helped a little bit via a few short emails -- leading
him to go from "zero to hero" with Docker.  We wrote a short blog post on
that which you can find at

  
https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdirk.eddelbuettel.com%2Fblog%2F2019%2F08%2F05%23023_rocker_debug_example&data=01%7C01%7Cjgreenberg%40unr.edu%7C047d13c96404437a1ddc08d79a0db508%7C523b4bfc0ebd4c03b2b96f6a17fd31d8%7C1&sdata=fYy14TBshMGoU%2FbpY%2BC5dRIqSEN20EjcyMeZ4KFgSsg%3D&reserved=0

It's nice as it gives a full rundown of all steps.

Hope this helps,  Dirk

--
https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdirk.eddelbuettel.com&data=01%7C01%7Cjgreenberg%40unr.edu%7C047d13c96404437a1ddc08d79a0db508%7C523b4bfc0ebd4c03b2b96f6a17fd31d8%7C1&sdata=08%2FZup32MftvnSq6YVpWAjhpQBpDAUE7Hm0E5pUh7x8%3D&reserved=0
 | @eddelbuettel | e...@debian.org

[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] Alternatives to R-devel on a Mac for package checking?

2020-01-15 Thread Merlise Clyde, Ph.D.
Just in case it helps anyone else who struggles to reproduce CRAN valgind 
checks, I decided to document my steps with R-devel & valgrind  at 
https://github.com/merliseclyde/docker-valgrind has the Dockerfiles to build a 
container starting with rocker/r-devel and adding supporting files to build the 
package using gcc-9 and gfortran-9

Waiting to see if that configuration actually reproduces the CRAN results  
(fingers-crossed that the valgrind issues have been eliminated)

best,
Merlise


Merlise A Clyde
Professor Department of Statistical Science
Duke University
http://stat.duke.edu/~clyde

cl...@duke.edu
919 681 8440





On Jan 15, 2020, at 9:29 PM, Jonathan Greenberg 
mailto:jgreenb...@unr.edu>> wrote:

Awesome -- the key was the "RD", so for me:

docker run -v /Users:/Users --rm -ti rocker/r-devel RD

(where, on a Mac, I was binding my Mac's /Users to the Docker's /Users 
directory)

Thanks, all!

--j

On Wed, Jan 15, 2020 at 2:53 PM Dirk Eddelbuettel 
mailto:e...@debian.org>> wrote:

Jonathan,

Rocker should be building weekly r-devel and drd (similar, was meant to be a
littler "lighter", effectively the same) images.

As Merlise noticed, somehow the cronjob push to the Docker Hub build service
started to fail -- this sadly happens once in a while so I manually triggered
a rebuild. They should be good now for 'R 4.0.0 to be'. Remember to invoke it
as 'RD' (for R-Devel) in the image, there is also an r-release as just 'R'.

Your case of "am on mac and need newer stuff" was also encountered last year
by Roger Koenker whom I helped a little bit via a few short emails -- leading
him to go from "zero to hero" with Docker.  We wrote a short blog post on
that which you can find at

  
https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdirk.eddelbuettel.com%2Fblog%2F2019%2F08%2F05%23023_rocker_debug_example&data=01%7C01%7Cjgreenberg%40unr.edu%7C047d13c96404437a1ddc08d79a0db508%7C523b4bfc0ebd4c03b2b96f6a17fd31d8%7C1&sdata=fYy14TBshMGoU%2FbpY%2BC5dRIqSEN20EjcyMeZ4KFgSsg%3D&reserved=0

It's nice as it gives a full rundown of all steps.

Hope this helps,  Dirk

--
https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdirk.eddelbuettel.com&data=01%7C01%7Cjgreenberg%40unr.edu%7C047d13c96404437a1ddc08d79a0db508%7C523b4bfc0ebd4c03b2b96f6a17fd31d8%7C1&sdata=08%2FZup32MftvnSq6YVpWAjhpQBpDAUE7Hm0E5pUh7x8%3D&reserved=0
 | @eddelbuettel | e...@debian.org


[[alternative HTML version deleted]]

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