<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Guys,<br>
<br>
I am getting this strange error:
<blockquote><span class="Apple-style-span" style="border-collapse:
separate; color: rgb(0, 0, 0); font-family: Consolas; font-size:
12px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform:
none; white-space: normal; widows: 2; word-spacing: 0px;
-webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
-webkit-text-decorations-in-effect: none;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(225, 226, 229); ">
<pre tabindex="0" class="GEWYW5YBFEB ace_text-layer ace_line GEWYW5YBGEB GEWYW5YBCT" style="font-family: Consolas !important; font-size: 13pt !important; color: black; font: inherit !important; white-space: pre-wrap !important; outline-style: none; outline-width: initial; outline-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; word-break: break-all; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; -webkit-user-select: text; box-sizing: border-box; width: 841px; padding-top: 6px; padding-right: 6px; padding-bottom: 6px; padding-left: 6px; line-height: 1.2; "><span class="GEWYW5YBFEB" style="outline-style: none; outline-width: initial; outline-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; white-space: pre-wrap !important;
word-break: break-all; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; -webkit-user-select: text; ">g++ -m64 -shared -s -static-libgcc -o cme.dll tmp.def RcppExports.o cme.o misc.o pb.o C:/Users/Kevin/R/win-library/3.1/RcppMLPACK/lib/x64/libRcppMLPACK.a -LC:/R/R-31~1.1/bin/x64 -lRlapack -LC:/R/R-31~1.1/bin/x64 -lRblas -lgfortran -Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LC:/R/R-31~1.1/bin/x64 -lR
RcppExports.o:RcppExports.cpp:(.text+0x2f83): undefined reference to `condMVNormParams(arma::Col<double>, arma::Mat<double>, arma::Col<unsigned int>, arma::Col<double>)'</span>
<span class="GEWYW5YBFEB" style="outline-style: none; outline-width: initial; outline-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; white-space: pre-wrap !important; word-break: break-all; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; -webkit-user-select: text; ">collect2: ld returned 1 exit status</span>
<span class="GEWYW5YBFEB" style="outline-style: none; outline-width: initial; outline-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; white-space: pre-wrap !important; word-break: break-all; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; -webkit-user-select: text; ">no DLL was created</span>
<span class="GEWYW5YBFEB ace_constant" style="outline-style: none; outline-width: initial; outline-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; white-space: pre-wrap !important; word-break: break-all; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; -webkit-user-select: text; color: rgb(197, 6, 11); ">ERROR: compilation failed for package 'cme'</span>
<span class="GEWYW5YBFEB" style="outline-style: none; outline-width: initial; outline-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; white-space: pre-wrap !important; word-break: break-all; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; -webkit-user-select: text; ">* removing 'C:/Users/Kevin/R/win-library/3.1/cme'</span>
<span class="GEWYW5YBFEB ace_constant" style="outline-style: none; outline-width: initial; outline-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; white-space: pre-wrap !important; word-break: break-all; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; -webkit-user-select: text; color: rgb(197, 6, 11); ">
Exited with status 1.
</span></pre>
</span></blockquote>
after trying to build my project in Rstudio on Windows 8.1 , here is
the function <br>
<blockquote>// [[Rcpp::export]]<br>
Rcpp::List condMVNormParams(arma::vec mu,<br>
arma::mat Sigma,<br>
arma::uvec inds,<br>
arma::vec values)<br>
{<br>
// tested, 10x faster than R implementation!<br>
// convenience: use R index conventions<br>
inds = inds - arma::ones<arma::uvec>(inds.n_elem);<br>
// declare return values<br>
int d = mu.n_elem;<br>
int nLeft = d - inds.n_elem;<br>
arma::vec muCond = arma::vec(nLeft);<br>
arma::mat SigmaCond = arma::mat(nLeft, nLeft);<br>
// find an ordering, that orders unknown first, known later<br>
arma::uvec perm = arma::uvec(d);<br>
int indsFound = 0;<br>
int indsNotFound = 0;<br>
for(int i = 0; i < d; i++)<br>
{<br>
if(any(inds == i))<br>
{<br>
// that is an index on which we condition -> sort
to end of vector<br>
perm(nLeft + indsFound) = i;<br>
indsFound += 1;<br>
} else {<br>
// index of coordinate we do not condition on!<br>
perm(indsNotFound) = i;<br>
indsNotFound += 1;<br>
}<br>
}<br>
// sort mu and Sigma by perm<br>
mu = mu(perm);<br>
Sigma = Sigma(perm, perm);<br>
// compute conditional matrices<br>
arma::mat S11 = Sigma.submat(0, 0, nLeft - 1, nLeft -
1);<br>
arma::mat S12 = Sigma.submat(0, nLeft, nLeft - 1, d - 1);<br>
arma::mat S21 = Sigma.submat(nLeft, 0, d - 1, nLeft -
1);<br>
arma::mat S22 = Sigma.submat(nLeft, nLeft, d - 1, d - 1);<br>
arma::vec mu1 = mu.subvec(0, nLeft - 1);<br>
arma::vec mu2 = mu.subvec(nLeft, d - 1);<br>
muCond = mu1 + S12*inv(S22)*(values - mu2);<br>
SigmaCond = S11 - S12*inv(S22)*S21;<br>
return Rcpp::List::create(Rcpp::Named("mu") = muCond,<br>
Rcpp::Named("Sigma") = SigmaCond);<br>
}<br>
</blockquote>
I did not touch any of the automatically generated files, here is
RcppExports.cpp<br>
<blockquote>// This file was generated by Rcpp::compileAttributes<br>
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393<br>
<br>
#include <RcppArmadillo.h><br>
#include <RcppMLPACK.h><br>
#include <Rcpp.h><br>
<br>
using namespace Rcpp;<br>
<br>
// stageMean<br>
double stageMean(arma::mat data, int stage, int treatment, int
marker);<br>
RcppExport SEXP cme_stageMean(SEXP dataSEXP, SEXP stageSEXP, SEXP
treatmentSEXP, SEXP markerSEXP) {<br>
BEGIN_RCPP<br>
SEXP __sexp_result;<br>
{<br>
Rcpp::RNGScope __rngScope;<br>
Rcpp::traits::input_parameter< arma::mat >::type
data(dataSEXP );<br>
Rcpp::traits::input_parameter< int >::type
stage(stageSEXP );<br>
Rcpp::traits::input_parameter< int >::type
treatment(treatmentSEXP );<br>
Rcpp::traits::input_parameter< int >::type
marker(markerSEXP );<br>
double __result = stageMean(data, stage, treatment,
marker);<br>
PROTECT(__sexp_result = Rcpp::wrap(__result));<br>
}<br>
UNPROTECT(1);<br>
return __sexp_result;<br>
END_RCPP<br>
}<br>
// condMVNormParams<br>
Rcpp::List condMVNormParams(arma::vec mu, arma::mat Sigma,
arma::uvec inds, arma::vec values);<br>
RcppExport SEXP cme_condMVNormParams(SEXP muSEXP, SEXP SigmaSEXP,
SEXP indsSEXP, SEXP valuesSEXP) {<br>
BEGIN_RCPP<br>
SEXP __sexp_result;<br>
{<br>
Rcpp::RNGScope __rngScope;<br>
Rcpp::traits::input_parameter< arma::vec >::type
mu(muSEXP );<br>
Rcpp::traits::input_parameter< arma::mat >::type
Sigma(SigmaSEXP );<br>
Rcpp::traits::input_parameter< arma::uvec >::type
inds(indsSEXP );<br>
Rcpp::traits::input_parameter< arma::vec >::type
values(valuesSEXP );<br>
Rcpp::List __result = condMVNormParams(mu, Sigma, inds,
values);<br>
PROTECT(__sexp_result = Rcpp::wrap(__result));<br>
}<br>
UNPROTECT(1);<br>
return __sexp_result;<br>
END_RCPP<br>
}<br>
</blockquote>
I was able to compile the same package on a different machine
(32bit) but did a clean rebuild. Any Idea what might have gone
wrong?<br>
<br>
Best, <br>
<br>
Kevin<br>
</body>
</html>