printL | R Documentation |
Print an object or a named list of objects. When multiple objects are given, their names are printed before their contents. When an object is a vector that is not longer than maxoneline
and its elements are not named, all the elements will be printed on one line separated by commas. When dec
is given, numeric vectors or numeric columns of data frames or data tables are rounded to the nearest dec
before printing. This function is especially helpful when printing objects in a Quarto or RMarkdown document and the code is not currently being shown to place the output in context.
printL(..., dec = NULL, maxoneline = 5)
... |
any number of objects to |
dec |
optional decimal places to the right of the decimal point for rounding |
maxoneline |
controls how many elements may be printed on a single line for |
nothing
Frank Harrell
prn()
w <- pi + 1 : 2
printL(w=w)
printL(w, dec=3)
printL('this is it'=c(pi, pi, 1, 2),
yyy=pi,
z=data.frame(x=pi+1:2, y=3:4, z=c('a', 'b')),
qq=1:10,
dec=4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.