WayneGitShell / GWSDAT

GroundWater Spatiotemporal Data Analysis Tool (GWSDAT) R-Shiny implementation.
https://stats-glasgow.shinyapps.io/GWSDAT
31 stars 7 forks source link

PPT Animation: RDCOMClient fails with setupPPV2() #170

Closed andrejadd closed 6 years ago

andrejadd commented 7 years ago

Although I import RDCOMClient in NAMESPACE it fails when calling COMCreate()

Warning: Error in createCOMReference: could not find function "createCOMReference" Stack trace (innermost first): 73: getCOMInstance 72: COMCreate 71: setupPPV2 [D:\1_Arbeit\1_GWSDAT\3_Shiny_Dev\GWSDAT/R/utilities.R#101] 70: AddPlotPPV2 [D:\1_Arbeit\1_GWSDAT\3_Shiny_Dev\GWSDAT/R/utilities.R#118] 69: makeTrendTableAnimation [D:\1_Arbeit\1_GWSDAT\3_Shiny_Dev\GWSDAT/R/plotTrendTable.R#209] 68: observeEventHandler [D:\1_Arbeit\1_GWSDAT\3_Shiny_Dev\GWSDAT/R/server.R#711] 4: 3: do.call 2: print.shiny.appobj 1:

In particular:

RDCOMClient::COMCreate("PowerPoint.Application") Error in createCOMReference(<pointer: 0x0000000045312728>, "COMIDispatch") : could not find function "createCOMReference"

As soon as I load library(RDCOMClient) it works. Why is it not seeing the createCOMReference() function? importFrom(RDCOMClient, createCOMReference) will also not work.

andrejadd commented 7 years ago

For now I disabled the code that shows the "PPT Animation Button" in server.R

if ( (.Platform$OS.type == "windows")) {

shinyjs::show(id = "save_spatial_ppt_anim")

shinyjs::show(id = "save_trendtable_ppt_anim")

}

andrejadd commented 6 years ago

I can put require(RDCOMClient) to make it work, though, it might not be good for the package.

Under Linux, package install of GWSDAT fails naturally with RDCOMClient.

Trying to put RDCOMClient into 'Suggests' of DESCRIPTION.

andrejadd commented 6 years ago

Using require(RDCOMClient) before making other calls, but not mentioning RDCOMClient in package or namespace. RDCOMClient has to be installed manually. Closed.