Downloading and loading the libraries

if(!require(devtools)){install.packages('devtools')}
if(!require(plotmatrix)){devtools::install_github('adhok/plotmatrix')}

Visualizing Matrices

A 3 by 3 matrix

set.seed(1000)
matrix_3_3 <- data.frame(a=rnorm(3),b=rnorm(3),c=rnorm(3))
print(matrix_3_3)
plotmatrix::plotmatrix(matrix_3_3)

A 5 by 10 matrix

matrix_5_10<- data.frame(a=rnorm(10),b=rnorm(10),c=rnorm(10),d=rnorm(10),e=rnorm(10))

print(matrix_5_10)
plotmatrix::plotmatrix(matrix_5_10,text_include=TRUE,legend_position = "none")


adhok/plotmatrix documentation built on May 28, 2019, 3:55 p.m.