最近因为项目要用到,所以在想办法把R语言用到C++中. 网上查了看到有一个Rcpp的工具.所以在这里总结一下. 现在能想到的几种在C++中调用R语言的方法如下: 1. 使用Rcpp R高级编程技巧及Rcpp的介绍 Rcpp的前世今生 Rcpp快速入门 Rcpp简明入门 Exposing C++ functions and classes with Rcpp modules Rcpp: Seamless R and C++ Integration Rcpp CRAN usage Writing R
getAnywhere 该函数可以返回一些函数的R源代码,如: getAnywhere(kmeans) 该函数具体用法,请参看官方说明. Retrieve an R Object, Including from a Namespace Description These functions locate all objects with name matching their argument, whether visible on the search path, registered as