SyntaxFix
Write A Post
Hire A Developer
Questions
How about rev(x)[1:5]?
rev(x)[1:5]
x<-1:10 system.time(replicate(10e6,tail(x,5))) user system elapsed 138.85 0.26 139.28 system.time(replicate(10e6,rev(x)[1:5])) user system elapsed 61.97 0.25 62.23