write.csv

A small report data.frame.

A small report data.frame. Print it (download is optional).

Goal

Print a till report.

report <- data.frame(
  city = c("Nairobi", "Kisumu"),
  units = c(12, 5),
  stringsAsFactors = FALSE
)
print(report)
tmp <- tempfile(fileext = ".csv")
write.csv(report, tmp, row.names = FALSE)
print(read.csv(tmp, stringsAsFactors = FALSE))
print("Download As from the toolbar for the .R script")