[R] creating character vector
Eik Vettorazzi
E.Vettorazzi at uke.uni-hamburg.de
Mon Mar 14 19:07:40 CET 2011
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
More information about the R-help
mailing list