Run macro with Rexcel

前端 未结 1 1373
北恋
北恋 2021-01-28 03:11

I am running a macro with Rexcel in VBA:

Sub create_efficient_frontier()

 RInterface.StartRServer

 Sheets(\"Analys\").Range(\"A52:K82\").ClearContents

 RInter         


        
相关标签:
1条回答
  • 2021-01-28 03:40

    Answer goes to @jlhoward.

    You have a typo in your VBA-code. Instead of:

    RInterface.GetDataframe "hmz$pweight", Range("Analys!A51:E76")

    you should use

    RInterface.GetDataframe "hmz$pweights", Range("Analys!A51:E76"),

    i.e. in your R code you are using pweights (plural) but in VBA code you use pweight (singular).

    0 讨论(0)
提交回复
热议问题