I have encountered some strange behaviour of the readLines()
-function which is basically included for all R-runs. As I have done it houndreds or thousands of times before, I tried to read the lines of a file like this:
workingDir <- ""
tempFile <- file(paste(workingDir, "/stationaer_mittel004_head3D.csv", sep="", collapse=""), open="r")
s_mittel001_head <- readLines(tempFile)
close(tempFile)
s_mittel001_head
This does not read the file content properly and results in something like this:
[1] "\"" "" "" "" ""
I have double- and tripöle and quadruple-checked if I have done something wrong with the filename but it works just fine when accessing the file in a file- or webbrowser. Subsequently, I plainly copied the file content to another csv and tried to open this one. It actually worked. I am on the administrive account of my laptop and both files show no special permission restrictions. Creating a new file with the same filename solves the issue, too.
**That's why I would like to know if somebody knows what might cause this behaviour.
Thank you!**