Displaying 1 result from an estimated 1 matches for "updown2".
Did you mean:
  updown
  
2010 Mar 05
3
how to make this sequence: 1,2,3,4,5,4,3,2,1
I'm just beginning R, with book Using R for Introductory Statistics, and one
of the early questions has me baffled.  The question is, create the
sequence: 1,2,3,4,5,4,3,2,1 using seq() and rep().
Now, as a programmer, I am punching myself to not be able to figure it out..
I mean, as simple as a for loop, but using seq, I am stumped.  I would think
c(1:5, 4:1) would be the brute force method