[R-pkg-devel] Additional_packages in drat repositories

2023-11-09 Thread Claborne, Daniel via R-package-devel
I have a data package �pmartRdata� hosted in a drat repository here:  
https://github.com/pmartR/drat following the instructions here:  
https://cran.r-project.org/web/packages/drat/vignettes/DratStepByStep.html

The package installs fine via install.packages(�pmartRdata�, repos = 
�https://pmartR.github.io/drat�).  I have included it under Suggests and added 
�https://pmartR.github.io/drat� to the Additional_repositories field in the 
DESCRIPTION of a package I am submitting to CRAN.  I�m getting failures on 
Debian/R-devel and Windows/R-devel when running examples that use this package:

`Error in library(pmartRdata) : there is no package called �pmartRdata�`

Checks on rhub via `rhub::check_for_cran` for ubuntu,fedora, and windows do not 
have this problem.  What do I need to do to get it to install on CRAN 
submission machines?

Best,
-Daniel Claborne

[[alternative HTML version deleted]]

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


[R-pkg-devel] Segfaults on R-devel

2024-07-08 Thread Claborne, Daniel via R-package-devel
Seemingly starting with the most recent builds of R-devel, I�ve been getting 
segfaults related to a piece of cpp code that indexes a zero-size 
NumericVector.  Essentially the same as this dummy example:

```
library(Rcpp)

sourceCpp(
  code = '
  #include
  using namespace Rcpp;

  // [[Rcpp::export]]
  NumericVector zeroindex() {
NumericVector zerosize(0);

Rcout << zerosize[0] << std::endl;

return zerosize;
  }
  '
)

zeroindex()
```

On R-release and on previous builds, this returns something like:

```
6.92674e-310
numeric(0)
```

But on current R-devel containers:

```

 *** caught segfault ***

address 0x1, cause 'memory not mapped'



Traceback:

 1: .Call()

 2: zeroindex()



Possible actions:

1: abort (with core dump, if enabled)

2: normal R exit

3: exit R without saving workspace

4: exit R saving workspace
```

It was easy enough to write a catch for the zero-size vector, however I�m 
wondering why the discrepancy between R-devel and previous versions?

Best,
-DMC

[[alternative HTML version deleted]]

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