On Fri, Apr 12, 2013 at 11:12 AM, Dale Smith wrote:
>
> fastLm(y, mat) # error is "error: Mat::init(): mismatch between size of
> auxiliary memory and requested size"
There is a further option within the Mat constructor, which when used
should prevent this error.
Specifically, we have:
mat(aux_
Dale,
Here is a simple fix: just _join_ the matrix and the col vector.
Result first (now with set.seed(42), so rngs different)
R> sourceCpp("/tmp/dale.cpp")
R> set.seed(42) ## needed !!
R> mat <- cbind(rnorm(50), rnorm(50), rnorm(50))
R> y <- rnorm(50)
R> fastLm2(y, mat)
$coefficients
Hi Dale,
On 11 April 2013 at 21:12, Dale Smith wrote:
| I had a problem this afternoon with an arma::mat constructor and the
| mat::insert_col method.
That is not a method I've used, I think, so I will defer comments.
Whenever I did what you do below (ie expand a N*k matrix with a standard
'i
Hello,
I had a problem this afternoon with an arma::mat constructor and the
mat::insert_col method. Since I got the example from Dirk, I thought I would
point out the problem I had and a solution. See
http://gallery.rcpp.org/articles/fast-linear-model-with-armadillo/
for background. Before I g
All right! I think I have it figured out, at least for the toy
functions/package.
What wasn't compiling wasn't my functions, it was RcppExports.cpp.
sourceCpp (and hence also the knit example) have been working for me all
along. The only issue (apparently) was that RcppExports.cpp was not
includ
On 11 April 2013 at 16:14, Alex Ustian wrote:
| Sorry to be dense, but you mean to copy and paste the source into an Rmd file
| and knit it? If yes, then I did just that and it did work.
Good.
Now try to find the differences to your code, which as I understand your
post, does not compile. As
Dirk,
Sorry to be dense, but you mean to copy and paste the source into an Rmd
file and knit it? If yes, then I did just that and it did work.
Thanks again,
Alex
On Thu, Apr 11, 2013 at 3:35 PM, Dirk Eddelbuettel wrote:
>
> Alex,
>
> Thanks to Mike, we do have one public, posted, working exa
Alex,
Thanks to Mike, we do have one public, posted, working example of Rcpp and
bigmemory in the Rcpp Gallery:
http://gallery.rcpp.org/articles/using-bigmemory-with-rcpp/
So before we go any further with this, can you please confirm that you manage
to re-build that example (once you grab t
Hello again,
Thank you for looking over my issue and sorry for not giving reproducible
code. I guess assumed that I was doing something obviously wrong but just
didn't see it.
I did add an entry for bigmemory (and Rcpp) in the DESCRIPTION file for
both the Depends and LinkingTo fields.
Here is
Hi to all,
I was investigating a way to write with Rcpp a function that removes all
the NA values in the input vector.
And before doing so, I was playing with Rcpp, writing this function:
library(inline)
cppFunction('
Vector na_test(const Vector& x) {
return setdiff(x, Vector::create(::tr
10 matches
Mail list logo