Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我做了以下事情:
season<-rep(c("aut","win","sum"), each=520)
当我这样做时,我会aut重复 520次,然后重复win520 次,然后sum重复 520 次。我想这样做 16 次,即520、520、520 aut,win然后sum再aut520、520、520和……16 次。谁能建议我如何做到这一点?winsum
aut
win
sum
谢谢
使用一个表达式,您可以同时使用 thetimes和each参数:
times
each
rep(c("aut","win","sum"), each=520, times=16)
关于什么
rep(rep(c("aut","win","sum"), each=520), times=16)
?