Just increase the margins on the left side and add the rownames
x <- cor(matrix(rnorm(600), 60, 100))
rownames(x)<-paste("row", 1:100)
op<-par(mar=c(1,5,1,1), xpd=TRUE)
image(t(x[nrow(x):1,]), axes=FALSE)
text(-0.01, seq(0,1,length=nrow(x) ), rownames(x), pos = 2, offset = 0,
cex = .7)
Another
Thank you both, these are very helpful hints.
Chris, could you please suggest how to modify what you sent to also show the
same labels as (horizontal) row names? I have not yet mastered the details
of R graphics...
Many thanks in advance,
Lara
On Mon, Nov 15, 2010 at 3:25 PM, Chris Stubben wrot
You could display the matrix as an image then add column names (rotated used
srt) if you really want them.
x <- cor(matrix(rnorm(600), 60, 100))
# set margins with extra space at top and xpd=TRUE to write outside plot
region
op<-par(mar=c(1,1,5,1), xpd=TRUE)
# display image without the 90 de
Hi Lara,
Hmm, I've never seen column names rotated in R (certainly you could in
graphics, etc. and this should do it in that case:
lapply(strsplit(colnames(x), ''), paste, collapse = "\n") ). You
could transpose the matrix so the columns become the rows and then
just have numbers (1:1600) as the
Dear List,
I have a large (1600*1600) matrix generated with symnum, that I am using to
eyeball the structure of a dataset.
I have abbreviated the column names with the abbr.colnames option. One way
to get an even more compact view of the matrix would be to display the
column names rotated by 90
5 matches
Mail list logo