truncMessage | R Documentation |
truncate long vectors for messages
truncMessage(
x,
ntrunc = 3,
prefix = "s",
midfix = " ",
altnix = "'",
sep = ", "
)
x |
Character vector |
ntrunc |
Integer: number of elements printed before truncation. DEFAULT: 3 |
prefix |
Character: Prefix added if |
midfix |
Character: string added after prefix OR before first altnix. DEFAULT: " " |
altnix |
Character: Alternative string padded around x if |
sep |
Character: Separator between elements. DEFAULT: ", " |
Character string
Berry Boessenkool, berry-b@gmx.de, Nov 2016
message
truncMessage("hi")
message("listing name", truncMessage( "hi" ), ".")
message("listing name", truncMessage(paste0("hi",1:10)), ".")
truncMessage(paste0("hi",1:10), ntrunc=1)
truncMessage(paste0("hi",1:10), ntrunc=2, prefix="", midfix="")
truncMessage(paste0("hi",1:10), ntrunc=8, prefix="files _ ")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.