strmultline: Replace some spaces in multi-word sentences by newlines

Description Usage Arguments Details Value Author(s) See Also

View source: R/strmultline.R

Description

Replace a space character by a newline in a multi-word sentence to get a better height / width ratio

Usage

1
strmultline(strings, ratio = 0.2)

Arguments

strings

a character vector containing the multi-word sentences to be split

ratio

the desired ratio height / width

Details

Very long tags, for example GO Term descriptions, make a bad tag cloud. strmultline tries to chop up such a long sentence into multiple (currently two) lines, to get a better height / width ratio.

Value

A character vector containing the modified sentences.

Author(s)

January Weiner <january.weiner@gmail.com>

See Also

tagcloud


january3/tagcloud documentation built on March 7, 2020, 12:47 a.m.