Learn R Programming

data.table (version 1.18.2.1)

frev: Fast reverse

Description

Similar to rev but faster.

Usage

frev(x)

Value

Returns the input reversed.

Arguments

x

An atomic vector or list.

Details

Similar to rev, frev only retains three attributes: names, class, and factor levels.

Examples

Run this code
# on vectors
x = setNames(1:10, letters[1:10])
frev(x)

# list
frev(list(1, "a", TRUE))

Run the code above in your browser using DataLab