Examples for 'bit::reverse_vector'


Reverse atomic vector

Aliases: reverse_vector

Keywords:

### ** Examples

x <- factor(letters)
rev(x)
 [1] z y x w v u t s r q p o n m l k j i h g f e d c b a
Levels: a b c d e f g h i j k l m n o p q r s t u v w x y z
reverse_vector(x)
 [1] 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2
[26]  1
## Not run: 
##D x <- 1:1e7
##D system.time(rev(x))
##D system.time(reverse_vector(x))
## End(Not run)

[Package bit version 4.0.4 Index]