seq - Creating a repeating vector sequence in R -


this question has answer here:

i need help. how create following vector sequence:

 1 1 1 1 2 2 2 3 3 4  

i tried use (rep) , (seq) still unsucessfull.

try this:

rep(1:4,4:1) 

output:

[1] 1 1 1 1 2 2 2 3 3 4 

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -