<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Estimados<div><br></div><div>Se me puso en la cabeza, hacer algo en C++ que ejecute un código R, nada complicado, experimentación.</div><div><br></div><div>Al respecto hay por ejemplo:</div><div><br></div><div><pre>#include <RInside.h>
int main(int argc, char *argv[]) {
RInside R(argc, argv); // Inicializa R
// Ejecutar una expresión R
R.parseEvalQ("resultado <- sqrt(16)");
// Obtener resultados desde R
double resultado = R["resultado"];
std::cout << "Resultado desde R: " << resultado << std::endl;
return 0;
}</pre></div><div><br></div><div>El problema es que no logro configurar Xcode en c++ consola, para probar el código, en otras palabras, puedo ejecutar algunos programas simples que yo mismo me creo, pero no logro hacer que lea el encabezado, lógicamente, sin este no funciona.</div><div><br></div><div>¿Alguno pudo, puedo, o sabe como hacer en Xcode Mac ARM?</div><div><br></div><div>Las referencias a RInside son estas:</div><div><div style="display: block;"><div style="-webkit-user-select: all; -webkit-user-drag: element; display: inline-block;" class="apple-rich-link" draggable="true" role="link" data-url="https://cran.r-project.org/web/packages/RInside/index.html"><a style="border-radius:10px;font-family:-apple-system, Helvetica, Arial, sans-serif;display:block;-webkit-user-select:none;width:228px;user-select:none;-webkit-user-modify:read-only;user-modify:read-only;overflow:hidden;text-decoration:none;" class="lp-rich-link" rel="nofollow" href="https://cran.r-project.org/web/packages/RInside/index.html" dir="ltr" role="button" draggable="false" width="228"><table style="table-layout:fixed;border-collapse:collapse;width:228px;background-color:#083D7F;font-family:-apple-system, Helvetica, Arial, sans-serif;" class="lp-rich-link-emailBaseTable" cellpadding="0" cellspacing="0" border="0" width="228"><tbody><tr><td vertical-align="center" align="center"><img style="width:228px;filter:brightness(0.97);height:228px;" width="228" height="228" draggable="false" class="lp-rich-link-mediaImage" alt="CRANlogo.png" src="cid:75BCCF41-BA31-4137-945C-568F9EA931E3"></td></tr><tr><td vertical-align="center"><table bgcolor="#083D7F" cellpadding="0" cellspacing="0" width="228" style="table-layout:fixed;font-family:-apple-system, Helvetica, Arial, sans-serif;background-color:rgba(8, 61, 127, 1);-apple-color-filter:initial;" class="lp-rich-link-captionBar"><tbody><tr><td style="padding:8px 0px 8px 0px;" class="lp-rich-link-captionBar-textStackItem"><div style="max-width:100%;margin:0px 16px 0px 16px;overflow:hidden;" class="lp-rich-link-captionBar-textStack"><div style="word-wrap:break-word;font-weight:500;font-size:12px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-topCaption-leading"><a rel="nofollow" href="https://cran.r-project.org/web/packages/RInside/index.html" style="text-decoration: none" draggable="false"><font color="#FFFFFF" style="color: rgba(255, 255, 255, 0.847059);">RInside: C++ Classes to Embed R in C++ (and C) Applications</font></a></div><div style="word-wrap:break-word;font-weight:400;font-size:11px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-bottomCaption-leading"><a rel="nofollow" href="https://cran.r-project.org/web/packages/RInside/index.html" style="text-decoration: none" draggable="false"><font color="#FFFFFF" style="color: rgba(255, 255, 255, 0.54902);">cran.r-project.org</font></a></div></div></td></tr></tbody></table></td></tr></tbody></table></a></div></div></div><div><div style="display: block;"><div style="-webkit-user-select: all; -webkit-user-drag: element; display: inline-block;" class="apple-rich-link" draggable="true" role="link" data-url="https://github.com/eddelbuettel/rinside/tree/master"><a style="border-radius:10px;font-family:-apple-system, Helvetica, Arial, sans-serif;display:block;-webkit-user-select:none;width:300px;user-select:none;-webkit-user-modify:read-only;user-modify:read-only;overflow:hidden;text-decoration:none;" class="lp-rich-link" rel="nofollow" href="https://github.com/eddelbuettel/rinside/tree/master" dir="ltr" role="button" draggable="false" width="300"><table style="table-layout:fixed;border-collapse:collapse;width:300px;background-color:#E6E6E6;font-family:-apple-system, Helvetica, Arial, sans-serif;" class="lp-rich-link-emailBaseTable" cellpadding="0" cellspacing="0" border="0" width="300"><tbody><tr><td vertical-align="center" align="center"><img style="width:300px;filter:brightness(0.97);height:150px;" width="300" height="150" draggable="false" class="lp-rich-link-mediaImage" alt="rinside.png" src="cid:D2A060C5-B7BB-4B77-A30C-C272A6B6EE71"></td></tr><tr><td vertical-align="center"><table bgcolor="#E6E6E6" cellpadding="0" cellspacing="0" width="300" style="table-layout:fixed;font-family:-apple-system, Helvetica, Arial, sans-serif;background-color:rgba(230, 230, 230, 1);-apple-color-filter:initial;" class="lp-rich-link-captionBar"><tbody><tr><td style="padding:8px 0px 8px 0px;" class="lp-rich-link-captionBar-textStackItem"><div style="max-width:100%;margin:0px 16px 0px 16px;overflow:hidden;" class="lp-rich-link-captionBar-textStack"><div style="word-wrap:break-word;font-weight:500;font-size:12px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-topCaption-leading"><a rel="nofollow" href="https://github.com/eddelbuettel/rinside/tree/master" style="text-decoration: none" draggable="false"><font color="#272727" style="color: rgba(0, 0, 0, 0.847059);">eddelbuettel/rinside: Seamless embedding of R in C++ programs</font></a></div><div style="word-wrap:break-word;font-weight:400;font-size:11px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-bottomCaption-leading"><a rel="nofollow" href="https://github.com/eddelbuettel/rinside/tree/master" style="text-decoration: none" draggable="false"><font color="#808080" style="color: rgba(0, 0, 0, 0.498039);">github.com</font></a></div></div></td></tr></tbody></table></td></tr></tbody></table></a></div></div></div><div style="display: block;"><br></div><div style="display: block;">Gracias</div><div style="display: block;"><br></div><div style="display: block;">Javier Rubén Marcuzzi</div></body></html>