As a workaround, depending on how large the dataset is and how many
stray CRs you have, you might be better off to import the data into a
spreadsheet program and clean it manually (search for blanks in the last
column, move stranded data up from the next line).
Alternately, although this may be grasping at straws since I've never
tried it, you might be able to load and concatenate the data as a string
and then use the regexp functions such as sub() to remove the early CRs.
You'd then need to process the string into your desired data structure.
Andrew
-----Original Message-----
From: s-news-owner@lists.biostat.wustl.edu
[mailto:s-news-owner@lists.biostat.wustl.edu] On Behalf Of J. S.
Gangolly
Sent: March 9, 2007 9:11 AM
To: Stuart Luppescu
Cc: s-news@lists.biostat.wustl.edu
Subject: Re: [S] Scanning a line for a carriage return
Sure you can replace just about anything coded in ascii
using replace-string in emacs. Unfortunately, many of these
control characters are not encoded in ascii. That is why
you don't see them in text editors. In emacs, SR-NL shows
up as ^M for example. However, I don't think you can
remove them, since ^M in ascii is semantically not the same
as Meta-M or Ctrl-M in the encoding.
Jagdish
|