Forum Discussion

troyhimes's avatar
troyhimes
Resolver I
4 years ago
Solved

R script not working in Service

 

    #"Removed Duplicates" = Table.Distinct(#"Changed Type2", {"Column X"}),
    #"Run R script" = R.Execute("# 'dataset' holds the input data for this script#(lf)#(lf)write.csv(dataset, file = ""C:/Users/userX/Downloads/data.csv"")",[dataset=#"Removed Duplicates"]),
    ReturnValue = #"Removed Duplicates"
in
    ReturnValue

 

 

I use R script to export data to a csv file which works great when I open the file in desktop.  When published to the service it doesn't function and there are no errors returned.   I've tried changing the file destination to a public network but doesn't seem to change the outcome.  Any ideas? 

3 Replies