[R] How to pass strings to functions? [once once more, now With content I hope...]
Thomas Lumley
tlumley at u.washington.edu
Fri Jul 9 05:30:38 CEST 2004
On Thu, 8 Jul 2004, Gijs Plomp wrote:
> Dear expeRts,
>
> I fail to succesfully pass strings to functions. It comes down to the
> observation that
>
> > plot(someVariable,anotherVariable)
>
> works fine, but
>
> > x <- "someVariable"
> > y <- "anotherVariable"
> > plot(x,y)
>
> does not.
>
> Does this have something to do with the returned value of x being
> /"someVariable"/ and not /someVariable/, i.e. without the quotation
> marks? Is there any way to work around this?
>
This is in the FAQ.
-thomas
More information about the R-help
mailing list