[R] creating character vector

Eik Vettorazzi
Mon, 14 Mar 2011 18:07:40 -0000

Hi Jim

create  <-function(...) paste(substitute(list(...)))[-1]

create(a,b,c)

should work.

hth.

Am 14.03.2011 10:29, schrieb Maas James Dr (MED):
> Is there a way to convince R to create a character vector without using the
quotes?
>
> This works
>
> ex1 <-  c("first","second")
>
> but when I try this it doesn't
>
> ext <- as.character(c(first,second))
>
> it complains. I have many variables to put into character vectors so
dispensing with the quotes would be useful.
>
> Thanks
>
> Jim
>
>
> ==============================> Dr. Jim Maas
> University of East Anglia
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

--
Eik Vettorazzi
Institut f?r Medizinische Biometrie und Epidemiologie
Universit?tsklinikum Hamburg-Eppendorf

Martinistr. 52
20246 Hamburg

T ++49/40/7410-58243
F ++49/40/7410-57790