Learn R Programming

matlab2r (version 1.5.0)

char: Convert an array to a character array

Description

A character array is a sequence of characters, just as a numeric array is a sequence of numbers. A typical use is to store a short piece of text as a row of characters in a character vector.

Usage

char(A)

# S4 method for character char(A)

# S4 method for array char(A)

Value

A converted to characters

Arguments

A

a vector or array (not yet supported)

Methods (by class)

  • char(character): Converting a character vector

  • char(array): Converting a character array

Author

Waldir Leoncio

Examples

Run this code
char("Hi!")
char(matrix(letters, 2))

Run the code above in your browser using DataLab