View source: R/strwrap_factor.R
strwrap_factor | R Documentation |
String wrapping for factor variables
strwrap_factor(x, width, ...)
x |
a factor vector |
width |
Positive integer giving target line width (in number of characters). A width less than or equal to 1 will put each word on its own line. |
... |
arguments passed to |
a factor vector the same length as x
with factor levels wrapped
nt_yorks <- factor(c("Beningbrough Hall (Historic House)",
"Braithwaite Hall (Historic Property)",
"Brimham Rocks (Countryside)",
"East Riddlesden Hall (Historic House)",
"Fountains Abbey (Abbey)",
"Gibson's Mill (Historic Property)",
"Goddards House & Garden (Historic House)",
"Hardcastle Crags (Countryside)",
"Hudswell Woods (Countryside)",
"Maister House (Historic Property)",
"Moulton Hall (Historic Property)",
"Nostell Priory (Historic House)",
"Nunnington Hall (Historic Property)",
"Rievaulx Terrace and Temples (Garden)",
"Roseberry Topping (Countryside)",
"Studley Royal Water Garden (Garden)",
"The Bridestones (Countryside)",
"Treasurers House (Historic Property)"))
strwrap_factor(nt_yorks, width = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.