[R] Dealing with special characters at end of line in file
bgunter@4567 @ending from gm@il@com
Sat Dec 15 16:45:06 CET 2018
... or used the fixed = TRUE argument.
> z <-"In Alvarez Cabral street by no. 105.\\000"
> sub("\\000","", z, fixed = TRUE)
 "In Alvarez Cabral street by no. 105."
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sat, Dec 15, 2018 at 7:32 AM J C Nash <profjcnash using gmail.com> wrote:
> I am trying to fix up some image files (jpg) that have comments in them.
> Unfortunately, many have had extra special characters encoded.
> rdjpgcom, called from an R script, returns a comment e.g.,
> "In Alvarez Cabral street by no. 105.\\000"
> I want to get rid of "\\000", but sub seems
> to be giving trouble.
> > sub("\\000", "", ctxt)
>  "In Alvarez Cabral street by no. 105.\\0"
> Anyone know how to resolve this?
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help