Question

I am using this in a shiny app

df = data.frame(doLogin()$Account,doLogin()$LoginTime)
write.table(df,file='collect_data/LoginUserData.csv', append=T, sep=',', col.names=F,   row.names=F)

After I restart the app, the text is overlapping with the previous line. I want write.table to find a new blank row and start writing from that new row.

Was it helpful?

Solution

I suppose you could start by writing a line-end. Seems like the previous write operation was not getting completed properly:

df = data.frame(doLogin()$Account,doLogin()$LoginTime)
cat("\n", file='collect_data/LoginUserData.csv', append=TRUE)
write.table(df,file='collect_data/LoginUserData.csv', append=TRUE, sep=',', col.names=F,   row.names=F)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top