I am trying to put three dataframes (that are filled from a database) in one csv file, so I used sink().
sink('file.csv')
cat('Dataframe 1')
write.csv(df1)
cat('--------------')
cat('\n')
cat('\n')
cat('Dataframe 2')
write.csv(df2)
cat('--------------')
cat('\n')
cat('\n')
cat('Dataframe 3')
write.csv(df3)
cat('----------------')
(sink)
This results with code being displayed at the bottom
How can I remove this?
At the end, you have
This is a reference to the sink function, and will print the source code of that function. It seems that what you want is to stop diverting output to the sink. Try this instead: