Re: [R] how to input a string without quote

2012-11-27 Thread snawy ben
Wow, you are so lazy... But sometimes R is just designed for lazy guys... ## f = function(a) { s = substitute(a) as.character(s) } ## Yihui Cheers, Yihui, nearly 4 years after your post this still works like a charm. ps: of course I am not lazy, I simply want to avoid error prone input!

Re: [R] how to input a string without quote

2008-11-30 Thread Jinsong Zhao
Wow, you are so lazy... But sometimes R is just designed for lazy guys... ## f = function(a) { s = substitute(a) as.character(s) } ## f(a = asdf) [1] "asdf" f(qwer) [1] "qwer" Regards, Yihui -- Yihui Xie <[EMAIL PROTECTED]> Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile:

Re: [R] how to input a string without quote

2008-11-30 Thread hadley wickham
On Sun, Nov 30, 2008 at 11:38 AM, Carl Witthoft <[EMAIL PROTECTED]> wrote: > "From: Yihui Xie > Date: Sun, 30 Nov 2008 15:32:35 +0800 > > Wow, you are so lazy... But sometimes R is just designed for lazy guys... " > > > Yeah, well, laziness is the mother of creativity :-) . > But seriously: I kno

Re: [R] how to input a string without quote

2008-11-30 Thread Carl Witthoft
"From: Yihui Xie Date: Sun, 30 Nov 2008 15:32:35 +0800 Wow, you are so lazy... But sometimes R is just designed for lazy guys... " Yeah, well, laziness is the mother of creativity :-) . But seriously: I know far too many engineers who plug madly away for hours/days on end, where I would jus

Re: [R] how to input a string without quote

2008-11-29 Thread Yihui Xie
Wow, you are so lazy... But sometimes R is just designed for lazy guys... ## f = function(a) { s = substitute(a) as.character(s) } ## > f(a = asdf) [1] "asdf" > f(qwer) [1] "qwer" Regards, Yihui -- Yihui Xie <[EMAIL PROTECTED]> Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +

Re: [R] how to input a string without quote

2008-11-29 Thread Gabor Grothendieck
This works if you type it in from the R console: > s <- readline() this is my string > s [1] "this is my string" On Sat, Nov 29, 2008 at 9:41 AM, Jinsong Zhao <[EMAIL PROTECTED]> wrote: > Hi there, > > I hope to use a string as an input in my function, however, I don't want > to input the quot