Learn R Programming

pubmed.mineR (version 1.0.15)

space_quasher: Removes extra spaces between words.

Description

space_quasher will automatically remove extra spaces between words. Therefore only one space between any pair of words will be left

Usage

space_quasher(x)

Arguments

x

x is a text with single or multiple sentences given within double quotes.

Value

Sentences(s) in which extra spaces between any pair of words are quashed to one.

Details

The extra spaces between words in sentences is quashed to one via space_quasher().

Examples

Run this code
# NOT RUN {
space_quasher("I am       a ghostbuster. I have the tools    required to  hunt ghosts")
# }
# NOT RUN {
##here pubmed_result.txt is the text file of abstracts saved from PubMed.
# }

Run the code above in your browser using DataLab