[R] seq()

Stephan Kolassa Stephan.Kolassa at gmx.de
Wed Jan 21 18:47:55 CET 2009


Hi Felipe,

concatenate two sequences using c():

c(seq(from=27,to=51,by=2),seq(from=1,to=25,by=2))

HTH,
Stephan


Felipe Carrillo schrieb:
> HI:
> Could someone help me with the seq function? I have a range of values starting from 1 to 52 but I want seq to start at 27 by=2, but when it reaches 51 start with with number 1 to 25. is this possible. I can do the basics of seq() but I can't figure how to do this one. This is how I want my sequence to look like:
> 27 29 31 33 35 37 ............51 1 3 5 7 9 11 13 ...........25
> 
> Felipe D. Carrillo  
> Supervisory Fishery Biologist  
> Department of the Interior  
> US Fish & Wildlife Service  
> California, USA
> 
> ______________________________________________
> 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