我正在尝试使用带有 Rexcel 工具的 Excel 执行 R 代码。
我创建了一个按钮和一个执行以下代码的关联宏:
Sub button()
RInterface.StartRServer
RInterface.RunRFile "C:/Users/fran21/Downloads/R_NYSE_Hadoop/predicciones.R"
RInterface.GetArray "array", Range("A24")
RInterface.StopRServer
End Sub
我使用 RunRFile 来执行我的 R 代码和 GetArray 来尝试显示我的 R 代码的变量。执行不会引发错误,但我看不到结果!