[R] integer vector to a string
Dimitrios Rizopoulos
Dimitris.Rizopoulos at med.kuleuven.be
Wed May 10 21:11:11 CEST 2006
probably you need ?paste, e.g.,
paste(1:500, collapse = ",")
I hope it helps.
Best,
Dimitris
Quoting Søren Merser <merser at image.dk>:
> hi there
> is there a way that i can coerce a vector of integers to ONE string
> with
> the numbers comma separated like:
> 1:500 -> "1,2,3, ..., 500"
>
> i've tried deparse, but it divides the result into a vector of string
>
> (depending on the setting of width with a max of 500)
>
> regards soren
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
More information about the R-help
mailing list