printm {lazy.tools} | R Documentation |
Print multiple objects together with their names
printm(..., .sep. = ", ", .NAchar. = ".", .FILL. = ".^")
Printm(..., .sep. = ", ", .NAchar. = ".", .FILL. = ".^")
... |
objects to be printed |
.sep. |
delimiter string |
.NAchar. |
a character to indicate NA |
.FILL. |
string of length 2 to be used to fill in the blanks |
Printing array may be misleading.
This function can print data.frames with other objects.
In contrast, lazy.tools::Print
cannot print data.frames
but allows some formatting.
Use Formatting data.frame
Those characters which match the value of .FILL. will be printed as blanks. If you know that the objects contain ".^", change the definition of .FILL..
When the actual arguments consist of string literals or numbers, they will be printed without names.
If the objects contain UTF-8 characters, the result may be misleading
due to the bug of print.data.frame
method.
The first element of ... will be returned invisibly so that
this function can be used with pipe operator.
Use capture.output
function, not the return value,
to utilize the printed output of this function.
Mat <- matrix(1:6,3,2, dimnames=list(NULL,c("c1","C2")))
DF <- as.data.frame(Mat)
DF[2,2] <- NA
printm( 1.5:2.5, letters[1:2], Mat, DF, c(TRUE,FALSE), .sep.=", " )
printm( "This is an example.", DF, 123, Mat+Mat )
d1 <- data.frame(x=1:3,y=11:13)
d2 <- data.frame(x=21:24,y=31:34)
ld <- list(d1,d2)
df <- as.data.frame(rbind(d1,d2))
printm(d1,d2,ld,df,NULL,d1)