Hi, Im not sure if this is the right place to post this.  I am using Xubuntu
Karmic Koala and am trying to use the Rcpp package.  I am testing it using a
simple code that takes in a vector and adds 1 to each element:

#include <Rcpp.h>

// This file takes in a vector and adds one to each entry
RcppExport SEXP addone(SEXP vec){

    // create a local copy of vec
    Rcpp::NumericVector orig(vec);

    // create an output vector
    Rcpp::NumericVector vecout(orig.size());

    for(i=0;i<orig.size();i++) {
        vecout[i] = orig[i]+1;
    }

    Rcpp::Pairlist
res(Rcpp::Named("result",vecout),Rcpp::Named("original",orig));

    return res;
}

I then try to use - R CMD SHLIB addone.cpp
that didnt work.  the error said there was no such file  - "Rcpp.h" .
Then i came across Dirk Eddelbeutel's beamer presentation and followed the
suggestion to copy Rcpp.h to /usr/loca/include and libRcpp.so to
/usr/local/lib
Then i tried R CMD SHLIB addone.cpp again but got many errors.  Here is a
small selection:

/usr/local/include/Rcpp.h:34:32: error: RcppDatetimeVector.h: No such file
or directory
/usr/local/include/Rcpp.h:35:23: error: RcppFrame.h: No such file or
directory
/usr/local/include/Rcpp.h:36:26: error: RcppFunction.h: No such file or
directory
/usr/local/include/Rcpp.h:37:22: error: RcppList.h: No such file or
directory

could someone help?  im afraid im new both to linux and Rcpp!

best,
abhisek

	[[alternative HTML version deleted]]

