On Tue, 28-November-2017, at 00:24:33, Dirk Eddelbuettel
wrote:
> On 28 November 2017 at 00:03, Ramon Diaz-Uriarte wrote:
> | Hi Dirk,
> |
> |
> | On Mon, 27-November-2017, at 14:14:09, Dirk Eddelbuettel
> wrote:
> | > Ramon,
> | >
> | > On 27 Novemb
Hi Dirk,
On Mon, 27-November-2017, at 14:14:09, Dirk Eddelbuettel
wrote:
> Ramon,
>
> On 27 November 2017 at 10:43, Ramon Diaz-Uriarte wrote:
> | Dear All,
> |
> | I am trying to pass to C++ an R list that contains a data frame. Using gcc
list, works fine with
both gcc and clang
#include
using namespace Rcpp;
// [[Rcpp::export]]
void withList(Rcpp::List bl) {
Rcpp::List df1 = bl["the_df"];
Rcpp::Rcout << " size is " << df1.size() << std::endl;
Rcpp::IntegerVector c1 = df1["first&qu
On Wed, 24-06-2015, at 15:22, Matt D. wrote:
> On 6/24/2015 15:07, Ramon Diaz-Uriarte wrote:
>> Hi Matt,
>>
>> Thanks a lot for the details and the work. That is great! There is a
>> problem, though: in my particular case, I am uploading my package to
>> BioCon
in Windows.
Best,
R.
On Wed, 24-06-2015, at 14:55, Matt D. wrote:
> On 6/22/2015 12:31, Ramon Diaz-Uriarte wrote:
>> Actually, I just noticed that things will not work if you need your package
>> to run on Windoze: Rtools uses gcc 4.6.3 there, and this will not work with
>>
Hi Dirk,
On Mon, 22-06-2015, at 13:21, Dirk Eddelbuettel wrote:
> On 22 June 2015 at 10:25, Ramon Diaz-Uriarte wrote:
> |
> | Dear All,
> |
> | Accessing an element of a list that should be TRUE/FALSE does not recognize
> | the boolean properly in Windows/gcc-4.6.3 unless I
.
Best,
R.
On Sat, 20-06-2015, at 23:38, Matt D. wrote:
> On 6/20/2015 21:13, Ramon Diaz-Uriarte wrote:
>> As a follow up to the thread below, using randutils has turned out to be
>> very simple (and provides some additional nice features, such as pick,
>> etc). Dire
ol"]]
readList(lFalse) == lFalse[["theBool"]] ## WRONG! should be 0
readList2(lTrue) == lTrue[["theBool"]]
readList2(lFalse) == lFalse[["theBool"]] ## OK now: should be 0
*/
--
Ramon Diaz-Uriarte
Department of B
itself). That can be solved by changing the line
auto exit_func = hash(&_Exit);
by, say
auto getenv_func = hash(&getenv);
and making the corresponding change a little bit further below.
Best,
R.
On Fri, 19-06-2015, at 00:13, Matt D. wrote:
> On 6/18/2015 14:34, Ramon Diaz-Ur
Dear Matt,
On Fri, 19-06-2015, at 00:13, Matt D. wrote:
> On 6/18/2015 14:34, Ramon Diaz-Uriarte wrote:
>> Dear All,
>>
>> Sometimes I use both R's and C++11's RNGs and distributions in the same
>> code base (I am not using OpenMP or similar). Although this
td::endl;
return f0(vec, ran_gen);
}
/*** R
f4 <- function(seed = NULL) {
if(is.null(seed))
seed <- as.integer(round(runif(1, min = 0, max = 2^16)))
return(f3(seed))
}
*/
////
--
Ramon Diaz-Uriarte
Department of
ackages in CRAN and BioConductor that
import Rcpp and almost none, of those I've looked at, use registration
(except for a few that use Kmisc's registerFunctions).
Thanks,
R.
--
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina
Universidad Autónoma de Madr
On Mon, 1 Apr 2013 10:13:54 -0500,Dirk Eddelbuettel wrote:
> On 1 April 2013 at 17:04, Ramon Diaz-Uriarte wrote:
> |
> |
> |
> | On Mon, 1 Apr 2013 08:15:48 -0500,Dirk Eddelbuettel wrote:
> |
> | > On 1 April 2013 at 14:48, Ramon Diaz-Uriarte wrote:
&
On Mon, 1 Apr 2013 08:15:48 -0500,Dirk Eddelbuettel wrote:
> On 1 April 2013 at 14:48, Ramon Diaz-Uriarte wrote:
> |
> | Dear All,
> |
> | I am confused about creating Rcpp Numeric Matrices larger than
> | .Machine$integer.max. The code below illustrates some of the po
tmp <- f1(4294967, 501) ## negative length vectors
50 * 9000 > .Machine$integer.max
tmp <- f1(50, 9000) ## sometimes segfaults
tmp[500000, 9000]
object.size(tmp) ## things are missing
prod(dim(tmp)) > .Machine$integer.max
## using either of these usually leads to segfault
mples, etc, but I
didn't want to fill up the list with unnecessary stuff, especially since I
think my confusion is due to my not understanding something about
Rf_ReplIteration).
Best,
R.
--
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina
Universidad Aut
Rcpp.h is wrong. You should only
> include RcppArmadillo.h.
Oooops. Will not do that again.
Best,
R.
> I should do something so that the compiler tells you this.
> Romain
> Le 10/12/12 16:49, Ramon Diaz-Uriarte a écrit :
> >
> >
> > Dear All,
> >
> > I am tr
lt;< std::endl;
double outf2 = f2(X, c1);
std::cout << "f0, this is X after f2" << std::endl << X << std::endl;
// double outf3 = f3(X.unsafe_col(c1)); //will not work
//double outf3 = f3(X.col(c1)); //will not work
return List::create(Na
most of the time is spent inside matrix
> multiplication, or solve(), or svd(), etc, refactoring would make little
> overall difference.
> On Monday, December 10, 2012, Ramon Diaz-Uriarte wrote:
> >
> > Dear All,
> >
> > I am using RcppArmadillo, and I am creating
esign manual, 2nd ed", p. 67), but I think I've read that for
std::vector, a) (with push_back), is a better choice than b) (using
reserve, not resize).
For me, a) involves writing less code.
Thanks,
R.
--
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medici
// [[Rcpp::export]]
int f2(const Rcpp::IntegerMatrix m1) {
const Rcpp::IntegerMatrix::Column c1 = m1(_, 1);
int dd = c1[0] * 2;
return dd;
}
// [[Rcpp::export]]
int f3(const Rcpp::IntegerMatrix m1) {
int dd = m1(0, 0) * 2;
return dd;
}
--
Ramon Diaz-Uriarte
Department of Biochemistry
his expected?
Thanks,
R.
--
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina
Universidad Autónoma de Madrid
Arzobispo Morcillo, 4
28029 Madrid
Spain
Phone: +34-91-497-2412
Email: rdia...@gmail.com
ramon.d...@iib.uam.es
http://ligarto.org/rd
and hope to have that ready for the next release.
Thanks for the clarification. Yes, it was the mixing of generated and user
files that was most troubling to me. But then, I realize, however, that
for most cases I can think of I would not need to mix things, given how
simple the compileAtt
Any hints that can be provided here?
Thanks again for the package and the new additions to it.
Best,
R.
--
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina
Universidad Autónoma de Madrid
Arzobispo Morcillo, 4
28029 Madrid
Spain
Phone: +34-91-497-24
j + 1)
> >
> > would be contiguous in memory (whereas x(i + 1, j) could be extremely far
> > away, depending on the size of the matrix).
> >
> > However, it seems that with Matrix objects it is the other way around, so
> > that x(i, j) is next to x(i + 1, j), not
lay around with RcppArmadillo and RcppEigen, and also see if I can
easily adapt my algorithms to use column-major order efficiently.
Thanks again.
Best,
R.
On Wed, 7 Nov 2012 13:43:52 -0600,Dirk Eddelbuettel wrote:
> Hi Ramon,
> And welcome!
> On 7 November 2012 at 20:25, Ramon
m = as(dm);
IntegerMatrix xm(m, m);
int i;
int j;
for(j = 0; j < m; j++) {
for(i = 0; i < m; i++) {
xm(i, j) = i * m + j;
}
}
',
plugin = "Rcpp",
verbose = TRUE)
nn <- 1
benchmark(byRow(nn), byCol(nn),
column
27 matches
Mail list logo