Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以通过在函数前添加这一行来导出像 Rcpp 这样的 Python 函数吗: // [[Rcpp::export]]
这并不完全相同。
但是您可以编写一个 R 函数,该函数使用 reticulate 访问 Python 函数,让它计算其返回值,并将其提供给 R。然后可以像提供任何其他 R 函数一样提供该 R 辅助函数。