Re: [R] creating character vector

From: Eik Vettorazzi <E.Vettorazzi_at_uke.uni-hamburg.de>
Date: Mon, 14 Mar 2011 19:07:40 +0100

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

______________________________________________
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.
Received on Mon 14 Mar 2011 - 18:11:05 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 14 Mar 2011 - 18:20:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive