File: misc.R

package info (click to toggle)
r-cran-rstudioapi 0.18.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 956 kB
  • sloc: makefile: 2
file content (10 lines) | stat: -rw-r--r-- 200 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
#' @importFrom utils capture.output
formatText <- function(text, n = 20L, truncated = "<...>") {

  result <- if (nchar(text) < n)
    text
  else
    paste(text, truncated)

  encodeString(result)
}