Skip to contents

Determine which characters are space characters

Usage

isspace(A)

Arguments

A

a character array or a string scalar

Value

a vector TF such that the elements of TF are logical 1 (true) where corresponding characters in A are space characters, and logical 0 (false) elsewhere.

Note

Recognized whitespace characters are and \\t.

Author

Waldir Leoncio

Examples

chr <- "123 Main St."
X <- "\t a b\tcde f"
isspace(chr)
#>  [1] 0 0 0 1 0 0 0 0 1 0 0 0
isspace(X)
#>  [1] 1 1 0 1 0 1 0 0 0 1 0