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?
write.table
(CSV stands for Comma Seperated Value BTW). – Checkoffwrite.csv2
defaults tosep = ";"
(anddec = ","
, which is why semicolon separators are sometimes used). – Withe