I've following R Code
tXPM <- function(x) {
.Call(tXPMCpp, x)
} and following RCPP code
SEXP tXPMCpp (SEXP xSEXP){
arma::mat GeneExp = Rcpp::as<arma::mat>(xSEXP);
arma::rowvec ColumnSums = sum(GeneExp, 0);
int_fast32_t i=0, n=0;
arma::mat::iterator it_end = GeneExp.end();
//One pass linear regression with one pass variance, skewness
for (arma::mat::iterator it = GeneExp.begin(); it != it_end; ++it) {
//std::cout << (*it) << std::endl;
*it = *it/ColumnSums.at(i);
n++;
if (n == int(GeneExp.n_rows)) {
n=0;
i++;
}
}
return Rcpp::wrap(trans(GeneExp));}
When i call this function by passing it datamatrix it shows following error:
- Error in .Call(tXPMCpp, x) : first argument must be a string (of length 1) or native symbol reference
How can i call this function?