Re: [R-pkg-devel] C function dbinom_raw missing on r-oldrel-windows-ix86+x86_64

2015-12-08 Thread Martyn Plummer
On Tue, 2015-12-08 at 04:54 +, Murray Efford wrote: > My recent revision of the package 'secr' has been accepted by CRAN, but I > see from the Check Results that installation fails (see link below) on > r-oldrel-windows-ix86+x86_64 (alone) because it cannot find dbinom_raw > (which I now call d

Re: [R-pkg-devel] compileAttributes() and 'using namespace' directives

2015-12-08 Thread Dirk Eddelbuettel
Georgi, Wrong list? Try rcpp-devel for Rcpp question. On 8 December 2015 at 14:37, Georgi Boshnakov wrote: | Hi, | | With a collaborator we are working on a package which uses Rcpp and RcppArmadillo. Our *.cpp files start with something like | | // [[Rcpp::depends(RcppArmadillo)]] Use th

Re: [R-pkg-devel] How to make S3-method for the "format" generic for class inheriting from "AsIs"

2015-12-08 Thread Erik Bulow
Thank you very much Hadley for your fast response! I do however find the following lines (102-113) from "data.frame" a little problematic here: [...] if (is.vector(xi1) || is.factor(xi1)) xi[[j]] <- rep(xi1, length.out = nr) else if (is.character(xi1) && inherits(xi1, "AsIs")) xi[[

[R-pkg-devel] compileAttributes() and 'using namespace' directives

2015-12-08 Thread Georgi Boshnakov
Hi, With a collaborator we are working on a package which uses Rcpp and RcppArmadillo. Our *.cpp files start with something like // [[Rcpp::depends(RcppArmadillo)]] #include #include "RcppArmadillo.h" using namespace arma; using namespace std; using namespace Rcpp; Running compileAttribu

Re: [R-pkg-devel] How to make S3-method for the "format" generic for class inheriting from "AsIs"

2015-12-08 Thread Hadley Wickham
Why not just make your own as.data.frame method? e.g. as.data.frame.pin <- function(x, ...) { structure( list(x), class = "data.frame", row.names = .set_row_names(length(x)) ) } data.frame() calls as.data.frame() on all of its arguments. Hadley On Tue, Dec 8, 2015 at 5:13 AM, Er

[R-pkg-devel] How to make S3-method for the "format" generic for class inheriting from "AsIs"

2015-12-08 Thread Erik Bulow
Dear list! I am one of two authors to the package "sweidnumbr" (https://cran.r-project.org/web/packages/sweidnumbr/index.html). This package introduce an S3-class called "pin" and methods etc for handling personal identification numbers. An object might look like: x <- structure("1912121212", cla