[R] Paste ignore arrayys

R. Michael Weylandt michael.weylandt at gmail.com
Sat Mar 10 17:47:00 CET 2012

Read ?paste and use something like

paste("GPS_", paste("TimeStamps", collapse = "_"),  sep = "")


On Sat, Mar 10, 2012 at 11:41 AM, Alaios <alaios at yahoo.com> wrote:
> Dear all,
> I am using paste to create a file name.
> filename<- paste("GPS_", TimeStamps, sep="")
> where TimeStamps is a character vector, of two elements.
> The problem is that the paste instead of one string will make two, one for each entry of the TimeStamps vector. Would it be possible to make the TimeStamps entry interconnect by _ and convert them to string. That then will create the
> "GPS_18:00_19:00"
> which is what I want.
> 'I would like to thank you in advance for your hel
> B.R
> Alex
>        [[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.

More information about the R-help mailing list