• 123 views | 2 messages Discussion: LEAP
    Topic: How to link LEAP and R?Subscribe | Previous | Next
  • Jiefeng Kang 2/26/2021

    3 Likes

    Is there any package or case study for linking LEAP model and R language? I am working on a city carbon emission project, and it is required to generate some customized plots and tables for the final report. What I did is to export MS Excel from LEAP model, and copy-paste the target raw result data to another MS Excel, and generate the plots and tables with Excel function or R programming. While that is annoying since I have to go through this process every time I change the input data in LEAP. So I wonder:
    - If there is a package that enable the users to link LEAP and R?
    - Or if there is any good workflow to work with both LEAP and R?
    - Or if I can export multiple table with one setting and one click in LEAP?

  • Charlie Heaps 2/28/2021
      Best Response

    2 Likes

    Hi again Kang,

    I am not familiar with R but I believe it can connect with the standard Windows Component Object Model (COM) architecture in Windows for automation and for connecting to other programs like Excel or LEAP. Suggest you dive into the LEAP help files for more information on LEAP's COM-based Application Programming Interface (API). There are various commands for selecting results and exporting them. The easiest way is to preconfigure certain "favorite" tables and charts, then use the API to select them and then export them (e.g. to Excel).

    I did also find the following, which seems like a useful starting guide for using the COM model with R..

    Hope this helps,

    Charlie