hi I have vector test. It has 3 elements. I want to join the three into one vector. "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY-157- 20". how can i do it.> class(test)[1] "character"> test[1] "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY" "157" [3] "20" Ramya -- View this message in context: http://www.nabble.com/vector-help-tp18575055p18575055.html Sent from the R help mailing list archive at Nabble.com.
Try this:
test=c("Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY","157","20")
paste(test, collapse="-",sep="")
HTH,
Jorge
On Mon, Jul 21, 2008 at 2:49 PM, Rajasekaramya <ramya.victory@gmail.com>
wrote:
>
> hi
>
> I have vector test. It has 3 elements. I want to join the three into one
> vector.
> "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY-157- 20".
> how can i do it.
>
>
>
> > class(test)
> [1] "character"
> > test
> [1] "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY" "157"
> [3] "20"
>
> Ramya
> --
> View this message in context:
> http://www.nabble.com/vector-help-tp18575055p18575055.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@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.
>
[[alternative HTML version deleted]]
Try: paste(test, collapse='-') On Mon, Jul 21, 2008 at 3:49 PM, Rajasekaramya <ramya.victory at gmail.com> wrote:> > hi > > I have vector test. It has 3 elements. I want to join the three into one > vector. > "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY-157- 20". > how can i do it. > > > >> class(test) > [1] "character" >> test > [1] "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY" "157" > [3] "20" > > Ramya > -- > View this message in context: http://www.nabble.com/vector-help-tp18575055p18575055.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. >-- Henrique Dallazuanna Curitiba-Paran?-Brasil 25? 25' 40" S 49? 16' 22" O
try this:
paste(test, collapse = "-")
Best,
Dimitris
----
Dimitris Rizopoulos
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
http://perswww.kuleuven.be/dimitris_rizopoulos/
Quoting Rajasekaramya <ramya.victory at gmail.com>:
>
> hi
>
> I have vector test. It has 3 elements. I want to join the three into one
> vector.
> "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY-157- 20".
> how can i do it.
>
>
>
>> class(test)
> [1] "character"
>> test
> [1] "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY" "157"
> [3] "20"
>
> Ramya
> --
> View this message in context:
> http://www.nabble.com/vector-help-tp18575055p18575055.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>
>
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm