Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

string.bounding.box

Determine Dimensions of Strings


Description

This determines the number of rows and maximum number of columns of each string in a vector.

Usage

string.bounding.box(string, type = c("chars", "width"))

Arguments

string

vector of strings

type

character: whether to count characters or screen columns

Value

rows

vector containing the number of character rows in each string

columns

vector containing the maximum number of character columns in each string

Author(s)

Charles Dupont

See Also

Examples

a <- c("this is a single line string", "This is a\nmulti-line string")
stringDims(a)

Hmisc

Harrell Miscellaneous

v4.5-0
GPL (>= 2)
Authors
Frank E Harrell Jr <fh@fharrell.com>, with contributions from Charles Dupont and many others.
Initial release
2021-02-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.