One way to do it, is just to insert another write.table() command giving
the text you want to write. Here's a simple example:
myfile <- "c:/temp/junk.csv"
for(i in 1:5) {
df <- data.frame(x=rnorm(3), y=rnorm(3))
write.table(paste0("Run #", i), myfile, sep="\t", append=(i!=1),
col.names=FALSE, row
I understand how I may use message() to provide some output on which run I will
be looking at. However, I wish to automate it, and have it written out to a
tab-delimited file. Below is the command to output my coefficients:
write.table(zbetas, file = "z_coeffs.csv", sep="\t", append = TRUE)
I d
2 matches
Mail list logo