Hi,
I have written small code in C++ using Armadillo and inline with
RcppArmadillo package.
The input is data.marix(X). Some cells might be NAs. Example in R: X =
matrix(sample(c(rnorm(10*9.9),NA)),ncol=10)
I am calculating conditional correlation on columns of that matrix, just
picking vectors,
NA, NaN or Inf
>
> across a vector or matrix and returns you an index vector. Armadillo can
> use
> indexing vectors in ways that are similar in R.
>
> Dirk
>
>
> |
> | On Oct 9, 2012 9:53 AM, "[email protected]" <
> [email protected]&
Can you provide an example how to convert Armadillo colvec to uvec vector
which I assume works as selector for rows?
Thanks
On 9 October 2012 18:17, [email protected] wrote:
> Dear Dirk,
>
> I dont see how to do that in Armadillo, but I think I can create same size
> Num
I am not running R's cor(..) function. I am calling arma::cor(...) on two
vectors. I cannot use R's function, because I have some nested loops and
extra steps before calculating Pearson's correlation.
The only thing I am providing in R is the matrix with values and matrix
with zeros and ones where
>
> On 9 October 2012 at 19:07, [email protected] wrote:
> | Can you provide an example how to convert Armadillo colvec to uvec
> vector which
> | I assume works as selector for rows?
>
> You may need to loop (or use STL iterators) to fill the uvec position by
> pos
:18, Douglas Bates wrote:
>
> On Tue, Oct 9, 2012 at 1:06 PM, [email protected]
> wrote:
> > Maybe I am not good in coding, but even though I managed to make uvec with
> > ones and zeros, I cannot use it to select rows in given column, compiler
> > complains
>
I already solved my problem, but I don't want to continue since it's off topic.
Mateusz
On 12 October 2012 01:17, Davor Cubranic wrote:
> According to Armadillo docs, submat's arguments are two uvec's, not a uvec
> and an int.
>
> Davor
___
Rcpp-devel
Hi,
I would like to implement algorithm which works on 4 or more dimensional
array. Is it possible to have full support of R arrays in Rcpp ?
Thanks
___
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/c