Last active
March 26, 2019 20:13
-
-
Save ImkeF/ea234e7a77f2ccae9d798f2a9ad76701 to your computer and use it in GitHub Desktop.
M functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Exports the current table to csv. Pass full PathFile specification as parameter | |
(path as text, dataset as table) => | |
let | |
ConvertedPath = Text.Replace(path, "\", "/"), | |
RScript = R.Execute("write.csv(dataset,"""&ConvertedPath&""") | |
output <- dataset | |
",[dataset=dataset]), | |
output = RScript{[Name="output"]}[Value] | |
in | |
output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you Imke. I used your technique and it is very useful, all of it: the conversion of the parameter and the R.Execute to write the file out.