Learn R Programming

Kmisc (version 0.1.0)

kRev: Reverse Elements of a Character Vector

Description

Use this function to reverse each element in a vector of characters (or a vector of items coercable to character).

Usage

kRev(x)

Arguments

x
a character vector.

Value

  • Returns x with each element reversed.

Examples

Run this code
kRev( c("abc", "def") ) ## returns c("cba", "fed")

Run the code above in your browser using DataLab