printL {Hmisc} | R Documentation |
printL
Description
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.
Usage
printL(..., dec = NULL, maxoneline = 5)
Arguments
... |
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 |
Value
nothing
Author(s)
Frank Harrell
See Also
Examples
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)