Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vitexo87
Post Prodigy
Post Prodigy

R script error when exporting data

I have an R script that aims to export the data of a report to excel already handling the export problems (special characters, formatting errors among others).

 

Below is the script and error, I already installed several packages in my R studio but the error persists.

 

# Write.csv (dataset.file = "PowerBIExport.csv")
"Write.table (trim (dataset), file =" C: /Users/vitor.oliveira/Desktop/teste.txt ", sep =" \ t ", row.names = FALSE)

 

Error Message:
R. Script Error
Error in is.data.frame (x): could not find the function "trim"
Calls: write.table -> is.data.frame
Execution stopped

20 REPLIES 20

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.