Quantcast
Viewing all articles
Browse latest Browse all 836

Setting work directory through R

Hello,

 

Just a heads up for anyone else trying to load a file through an R script, in my case SAP PA would quit whenever it encountered a file path like below:

 

"C:\Somedir\somefile.csv"

 

This would happen either through setwd() or read.csv() and the application would quit without any warnings (the only thing I found was in the log: [Sybase][ODBC Driver][Sybase IQ]Table xxxx_xx not found).

 

By trial and error I got to the line in the code which was loading the file and in the end got it to work by using the file path as below:

 

"C:/Somedir/somefile.csv"

 

I don't remember seeing this in any documentation so not sure if it's a bug or a feature, but in case anybody else gets this error, this might fix it.

 

Cheers,

Dan


Viewing all articles
Browse latest Browse all 836

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>