Skip to main content
100%

R.Execute example without the use of R.Execute() in Power Query [behind the scenes this gets executed bin\x64\Rscript.exe" --encoding=UTF-8 RScriptWrapper.R"]

✓ Published0🌍 Public
HHugoberry
Last edited Aug 21, 2017
Created on Aug 14, 2017

This example demonstrates how to execute an R script from within Power Query without explicitly invoking the `R.Execute` function, instead relying on the `AdoDotNet.DataSource` with the `R.Provider` to run a native query. The code passes a string containing an `output` variable that captures the result of `system2("whoami", stdout=TRUE)`, which retrieves the current username. The resulting table is then converted from binary R data using `RData.FromBinary`. This approach showcases the underlying use of `Rscript.exe` via the provider, highlighting an alternative integration path for R workflows in Power Query.

AI-generated description

Similar vizzes