Learn R Programming

soundcorrs (version 0.4.0)

revChar: Rev (reverse the order) for character strings.

Description

Like rev in Haskell when applied to a string. When applied to a vector of strings, reverses each string but maintains their order. That's why it's not called "rev.character": to avoid having to use rev.default everywhere else.

Usage

revChar(x)

Arguments

x

[character] String or a vector of strings to be reversed.

Value

[character] Reversed string or a vector of reversed strings in the original order.

Examples

Run this code
# NOT RUN {
soundcorrs:::revChar (c("kayak", "madam", "racecar"))
# }

Run the code above in your browser using DataLab