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

php - Embed BBCode within itself not working -

three.js - how to load gltf in three JS -

sql server - T-SQL: Access DB objects in same schema without qualifying? -