Forum Discussion
R script error when exporting data
Anonymous,
I think the R script can exprt as you need, but to get to teh bottom of the errors you're getting, can you advise on the questions I asjed earlier:
Just to be clear, that one line of R script (write.table...) is giving you two different errors:
- In Power BI, you get "Could not open file 'C: /Users/vitor.oliveira/Desktop/teste.txt': No such file or directory"; and
- In R Studio, you get "Error in is.data.frame (x): object 'dataset' not found"?
Is that right?
Are you calling the R script from a Power Query, or from an R visual (your R script works fine for me in both)?
For the data set you are exporting, and how are you referencing it in Power BI/R exactly?
Anonymous
I am trying to export data from power bi to csv file using R
I am giving the below commandin Power Query
write.csv(ALL_Data, "C:\\Users\\username\\Documents\\folder 1\\folder 2\\folder 3\\folder 4\\filename.csv")
I am getting the below error please help
DataSource.Error: ADO.NET: R script error.
Error in is.data.frame(x) : object 'ALL_Data' not found
Calls: write.csv ... eval.parent -> eval -> eval -> write.table -> is.data.frame
Execution halted
Details:
DataSourceKind=R
DataSourcePath=R
Message=R script error.
Error in is.data.frame(x) : object 'ALL_Data' not found
Calls: write.csv ... eval.parent -> eval -> eval -> write.table -> is.data.frame