display_wrapped: display_wrapped shows strings in the console

display_wrappedR Documentation

display_wrapped shows strings in the console

Description

Each string is split in pieces not exceeding a certain length by using HOQCutil::hard_split or stringr::str_wrap

Usage

display_wrapped(
  strings,
  width = getOption("width", 110) - 3,
  force_wrap = FALSE
)

Arguments

strings

A vector of strings

width

The width (length) that each line will have (at most). Default getOption('width', 110)-3

force_wrap

Boolean When TRUE forces the use of stringr::str_wrap. When FALSE HOQCutil::hard_split will be used when HOQCutil is available (which is of course the case unless this function is copied outside the package). Default: FALSE

Examples

## Not run: 
x=glue::glue_collapse(rep(c(letters,' '),5))
display_wrapped(c(x,x),60)
display_wrapped(c(x,x),60,T)

## End(Not run)

HanOostdijk/HOQCutil documentation built on July 28, 2023, 5:56 p.m.