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

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -