Test for White Space

DESCRIPTION:
Tests whether strings consist of only white space.

USAGE:
is.all.white(x, empty=T)

REQUIRED ARGUMENTS:
x:
character vector.

OPTIONAL ARGUMENTS:
empty:
logical flag: if TRUE, the empty string ("") will be considered white space.

VALUE:
logical vector of the same length as x, whose i'th element is TRUE if string x[i] consists of only white space. This is defined as any combination of spaces and/or tabs.

SEE ALSO:
character , nchar , paste .

EXAMPLES:
  s
[1] "some string" " \t "      ""

is.all.white(s) [1] F T T

is.all.white(s, empty=F) [1] F T F