Skip to content

R-SIG-Mac Digest, Vol 94, Issue 2

2 messages · Denis Chabot, Gordon Couger

#
Thanks Prof. Ripley,

Le 2010-12-02 ? 06:00, r-sig-mac-request at r-project.org a ?crit :
This works well for me for dataframe "test":

con <- file("test.csv", open="w", encoding = "LATIN1")
write.csv(test, con, row.names=F)
close(con)

I hesitated to use close() because this suggested it would be closed automatically:
"open opens a connection. In general functions using connections will open them if they are not open, but then close them again, so to leave a connection open call open explicitly."

But I quickly discovered I had to close manually.

Denis
18 days later
#
I use barebones.com's BBEdit 
so I have reminders and menu selections for converting 
to various character representations, hand editing spots,
 fixing line endings and 
Taking a quick look at data to work out strategies to use 
BASH, C, scripts or what 
have you to beat into shape. If $12?.00 USD is too 
much there is a free editor, Texwrangler.

They won't do anything you can't do other ways 
but they save this old mind time. 

Gordon