Re: [Rd] [SPAM?] [R] read.csv behaviour

From: Jeff Newmiller <>
Date: Tue, 27 Sep 2011 17:03:00 -0700

The consensus is that it is a very bad idea for a file nominally described as a CSV file to have a varying numbers of fields from record to record. If you have need for such a file and go to whatever lengths you need to in order to create it, please mark it as something other than a CSV file when you are done. With this in mind, you may be in a better position to understand why the pre-built facilities do not provide much support in your endeavor.

Jeff Newmiller The ..... ..... Go Live... DCN:<> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k

Sent from my phone. Please excuse my brevity.

Mehmet Suzen <> wrote:

This might be obvious but I was wondering if anyone knows quick and easy way of writing out a CSV file with varying row lengths, ideally an initial data read from a CSV file which has the same format. See example below.

I found it quite strange that R cannot write it in one go, so one must append blocks or post-process the file, is this true? (even Ruby can do it!!)

Otherwise it puts ,"","" or similar for missing column values in the shorter length rows and fill=FALSE option do not work!

I don't want to post-process if possible.

See this post:

Example that generated Error!


LEGAL NOTICE\ This message is intended for the use o...{...{{dropped:14}} mailing list Received on Wed 28 Sep 2011 - 08:18:40 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 28 Sep 2011 - 11:10:35 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive