For loops are not usually the primary cause of slow processing in R... poor 
memory handling is. 

But the closest you seem to come to asking a question in your email seems to be 
about Rcpp, which is off topic on this mailing list. Try reading all of the 
Rcpp vignettes, and then if needed ask on Rcpp-devel and mention which 
vignettes seemed most closely related to your question and give a reproducible 
example rather than snippets. 
-- 
Sent from my phone. Please excuse my brevity.

On March 19, 2018 3:36:47 AM PDT, akshay kulkarni <akshay...@hotmail.com> wrote:
>dear members,
>
>I am using R to model stock prices but a slow "for" loop has stifled my
>research.
>
>
>I am using Rcpp to speed up my "for" loop. I am also using RcppEigen to
>implement block operations on xts objects.....
>
>
>how do I use RcppEigen? If I just load it by:
>
>> require(RcppEigen)
>
>it is not recognising the .block method in C++.
>
>
>
>If I include it inside the cppFunction:
>
>> cppFunction(' include  <RcppEigen.h>  .....body')
>
>I get the following error:
>
>> error: "include doesn't name a type"
>
>
>My question is : how do I manipulate the installed RcppEigen package
>for the cppFunction to recognize block operations that are part of the
>Eigen library in C++? If I have to use the "include" key word
>(something like this: include <RcppEigen.h> ), where exactly should i
>position it in order to work with cppFunction ( I want to use Eigen
>block operation methods or functions inside the body of the
>cppFunction)?
>
>
>very many thanks for your time and effort.....
>
>
>yours sincerely,
>
>AKSHAY M KULKARNI
>
>
>       [[alternative HTML version deleted]]
>
>______________________________________________
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to