Printb {lazy.tools} | R Documentation |
Print Super Matrix ( Partitioned Matrix, Block Matrix ) with Separators.
Printb(smat, fmt = NULL, nrows = NULL, ncols = NULL, sep = "", debug = 0)
printb(smat, fmt = NULL, nrows = NULL, ncols = NULL, sep = "", debug = 0)
smat |
input super matrix with SMdim attributes |
fmt |
format specification of the form: name & width & . & dicimal |
nrows |
a vector consisting of the # of rows of each sub matrix |
ncols |
a vector consisting of the # of columns of each sub matrix |
sep |
separator character |
debug |
= 1 to debug |
This function prints the input partitioned matrix with separator spaces
and returns it invisibly (via invisible(x)).
Therefor, it can be used with a pipe operator.
For the partitioned matrices with supermatrix attributes,
see the description of supermat, getSM, or modSM.
SM <- demomat(c(2,3,4),c(1,2,4),supermat=1)
SMc <- demomat(c(2,3,4),c(1,2,4),supermat=1, root="a")
Printb( SM )
Printb( SM, sep="." )
Printb( SMc, fmt="8.0" )
attributes(SM)$SMdim=NULL
Printb( SMc, fmt="5", nrows=c(2,3,4), ncols=c(1,2,4))
Printb( SMc, fmt="5", nrows=c(3,3,3), ncols=c(2,2,2,1))
# with pipe
bigS <- demomat(c(2,3,4),c(1,2,4),supermat=1, root="a") |> printb()
print(bigS)