I have a problem I hope someone here can help me with. I thought about
posting straight to the emacs help list but the problem involves R and I am
also curious to see if it could be best addressed from within R or if Emacs
can help.

I have a very large file of ~ half a million rows with scattered octal
character codes (they show up in Emacs in red with the syntax '\xxx' where x
is a number. When I try to grep or gsub on columns containing these octals I
get messages similar to "invalid multibyte string".

I have discovered how to search for these in Emacs using C-q, but replace
doesn't seem to accept this. To further complicate things, I'd like to use
regular expressions to remove all of them, not just one code at a time.

What seemed to make sense to me, and which failed, was

M-x replace regex; C-q [0-9][0-9][0-9]

I can't even get M-x replace regex; C-q 222 to work, even when I can search
for it.

I"ve consulted the help lists and Friedl's "Mastering Regular Expressions"
without success.

Does anyone know of a way for me to get rid of these characters in either R
or Emacs?

Again, my apologies if I haven't posted on the most correct list.

Mark


Mark W. Kimpel MD  ** Neuroinformatics ** Dept. of Psychiatry
Indiana University School of Medicine

15032 Hunter Court, Westfield, IN  46074

(317) 490-5129 Work, & Mobile & VoiceMail
(317) 399-1219 Skype No Voicemail please

	[[alternative HTML version deleted]]

