ngsub | R Documentation |
Remove extra spaces and newline characters from text.
ngsub(text)
text |
The input text from which extra spaces and newline characters need to be removed. |
Remove Extra Spaces and Newline Characters
This function removes extra spaces and newline characters from the given text. It replaces sequences of multiple spaces with a single space and removes newline characters followed by a space.
Returns the modified text as a character string.
Satoshi Kume
## Not run:
ngsub("This is a text \n with extra spaces.")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.