I have the following code:
myTable[i,] = strsplit(line, split=";")[[1]]
write.csv(myTable[-1,], file="episodes_cleared.csv", sep=";", row.names=FALSE, quote=FALSE)
Unfortunately, the separator still is ',':
iEpisodeId,iPatientId,sTitle,sICPc,dStart,dEnd,bProblem
Running the code gives me:
Warning messages:
1: In write.csv(myTable[-1, ], file = "episodes_cleared.csv", sep = ";", : attempt to set 'sep' ignored
2: In write.csv(myTable[-1, ], file = "episodes_cleared.csv", sep = ";", :
attempt to set 'sep' ignored
What am I doing wrong?
First, you should provide a reproducible example.
However, if you use write.csv2
it defaults to using a semicolon as the separator.