« What I have done yesterday | Main | How to change language setting of R on Mac »

March 10, 2010

row.name option in write.table

I have no idea why I have to set row.name=F, but it seems that is what I want.
「praout.csv」をダウンロード

If I type

> write.table(bh1996, file="/Users/jun/Documents/data/practiceRdata/praout.csv", sep=",", row.name=F)

then I get,

「praout.csv」をダウンロード

but if I type

> write.table(bh1996, file="/Users/jun/Documents/data/practiceRdata/praout2.csv", sep=",", row.name=T)

then I get a file with an extra column that contains the observation number. So don't forget to set "row.names=F" I post the results as a reminder.

「praout2.csv」をダウンロード

« What I have done yesterday | Main | How to change language setting of R on Mac »

Comments

Post a comment



(Not displayed with comment.)


Comments are moderated, and will not appear on this weblog until the author has approved them.



« What I have done yesterday | Main | How to change language setting of R on Mac »