On Mon, 21 Nov 2005, anne001 wrote: > Thank you so much for your help > The data was collected by another lab. I don't know what they use. I > saved their excel file data into a csv file. I don't know if there is a > way of telling excel to do a better job. I am on panther, with > office 2004 for mac. > > require "csv" > arr = CSV.read(File.expand_path("~/Desktop/FaceRetest.cvs")) > > I get an error: > /usr/local/lib/ruby/1.8/csv.rb:607:in `get_row': > CSV::IllegalFormatError (CSV::IllegalFormatError) > > Ara's formulation does the same thing. > > I think there is a way to replace special characters in emacs but what > I tried so far does not work. > > I thought I could use readlines and a puts and then copy the ruby > output, which would not longer have the ^M, but somehow, ruby gets > mixed up, and suddenly stop parsing the lines, so I can't relie on ruby > readline either. It sounds like I need to figure out how to format the > input file better. And then I will be able to use your suggestions. run dos2unix on it. if it still fails you'll need see why the file is badly formatted. regards. -a -- =============================================================================== | ara [dot] t [dot] howard [at] gmail [dot] com | all happiness comes from the desire for others to be happy. all misery | comes from the desire for oneself to be happy. | -- bodhicaryavatara ===============================================================================