[R] quotation marks and scan
macqueen1 at llnl.gov
Mon Nov 18 17:38:15 CET 2013
I know you have a solution, but I would have suggested using print() with
quote=FALSE as a better way to illuminate what is going on, as in this
> foo <- 'bah"bah'
> print(foo, quote=FALSE)
As others said, the backslash isn't really there. So you only have to get
rid of the " which you can do with
To summarize, in R, due to its rules for formatting printed output, what
you see isn't always exactly what you have, and this is an example.
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
On 11/17/13 2:07 PM, "Erin Hodgess" <erinm.hodgess at gmail.com> wrote:
>Dear R People:
>I'm sure that this is a very simple problem, but I have been wresting with
>it for some time.
>I have the following file that has the following one line:
>Fair enough. I scan it into R and get the following:
>I need to get rid of the extra quotation marks and slashes. I've tried
>sorts of things, including gsub, as you see, but no good.
>Thank you for any help.
>Department of Computer and Mathematical Sciences
>University of Houston - Downtown
>mailto: erinm.hodgess at gmail.com
> [[alternative HTML version deleted]]
>R-help at r-project.org mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.
More information about the R-help