[EMAIL PROTECTED]:
>> charlist<-c("a","b","c")
>> lapply(charlist, function (y) paste("'",y,"'"))
Use 'sep=""'. And using 'sapply' instead of 'lapply' gives a nicer input.
The following works.
$ sapply(charlist, function(y) paste("'",y,"'", sep=""))
a b c
"'a'" "'b'" "'c'"
--
Karl Ove Hufthammer
______________________________________________
[email protected] 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.