count_spaces: Count number of spaces preceding a character input

Description Usage Arguments Value Author(s)

View source: R/utils.R

Description

For a given character input, split based on spaces (" "), and output a dataframe with the number of preceding spaces before each word.

Usage

1
count_spaces(x, combine_single_spaces = FALSE)

Arguments

x

A character input to be split.

combine_single_spaces

A logical input. Should strings separated by only 1 space be recombined? Defaults to FALSE.

Value

A data.frame

Author(s)

Matt Lewis


matthewlewis896/litreadr documentation built on Dec. 21, 2021, 2:56 p.m.