Learn R Programming

RVerbalExpressions (version 0.0.0.9000)

whitespace: Match a whitespace character.

Description

Match a whitespace character.

Usage

whitespace(.data = NULL)

Arguments

.data

Expression to append, typically pulled from the pipe %>%

Details

Match a whitespace character (one of space, tab, carriage return, new line, vertical tab and form feed). This function is looks for tabs with the following expression: \d

  1. space: https://codepoints.net/U+0020

  2. tab: https://codepoints.net/U+0009

  3. carriage return: https://codepoints.net/U+000D

  4. new line: https://codepoints.net/U+000

  5. vertical tab: https://codepoints.net/U+000B

  6. form feed: https://codepoints.net/U+000C

Examples

Run this code
# NOT RUN {
whitespace()

# create an expression
x <- whitespace()

# create input
string <- "1 apple"

# extract match
regmatches(string, regexpr(x, string))
# }

Run the code above in your browser using DataLab