powered by
This determines the number of rows and maximum number of columns of each string in a vector.
string.bounding.box(string, type = c("chars", "width"))
vector containing the number of character rows in each string
vector containing the maximum number of character columns in each string
vector of strings
character: whether to count characters or screen columns
Charles Dupont
nchar, stringDims
nchar
stringDims
a <- c("this is a single line string", "This is a\nmulti-line string") stringDims(a)
Run the code above in your browser using DataLab