export to csv - Text under generated table in .csv file in R -


for weekly reports generate, create .csv file outputs has 9 columns , 7 rows.

i use command create file:

write.csv(table, paste('home/weekly_',start.date,'.csv',sep=''), row.names=f) 

note: 'table' matrix (i believe that's right r terminology)

i add footnote/note under table in file, possible?

for example, if create text file instead of .csv file, use following commands:

cat("number of participants not eligible:") cat(length(which((tbl[,'reg_age_dob']<=18) & as.date(tbl[,'datewithdrew'])>='2013-01-01'& as.date(tbl[,'datewithdrew'])<'2013-04-01' & as.date(tbl[,'questionnaireenddate'])<'2013-01-01' ))) cat("\n") 

how appear under table in .csv output file?

after writing csv part, append rest new lines using

write("footer",file="myfile",append=true) 

solution here: add lines file

but aware of fact, csv parser upset, if not use comment tags correctly.

it might better use second file purpose.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -