search for: mtx2

Displaying 4 results from an estimated 4 matches for "mtx2".

Did you mean: mtx
2010 Apr 30
2
Flattening and unflattening symmetric matrices
Here's an easy question: I'd like to convert a symmetric matrix to a vector composed of the upper.tri() part of it plus the diagonal, and convert it back again. What's the best way to achieve this? I'm wondering if there are some built in functions to do this easily. I can encode fine: v <- c(diag(A),A[upper.tri(A)]) but I don't see an easy way to recover A from v
2009 Jul 29
1
Drawing lines in margins
...I'm using R v. 2.8.1 on Windows XP. Cheers, Alan I'm trying to make a horizontal barplot with a column of numbers on the right side. I'd like to put a line between the column header and the numbers. The following reconstructs the idea - just copy and paste it in: aa <- 1:10 plot.mtx2<-cbind(aa,aa+1) colnames(plot.mtx2)<-c("Male","Female") lci2<- cbind(aa-1,aa) uci2<- cbind(aa+1,aa+2) par(mar=c(5,6,4,5)) cols <- c("grey79","grey41") bplot2<-barplot(t(plot.mtx2),beside=TRUE,xlab="Malaria death rates per 100,000",...
2006 Oct 29
0
identify.hclust() not working for me
...didn't see from that what is my problem. If I should have, pardon me. Here is my session. As I understand the documentation, this should work with only an hclust object. I get a similar error when in include a FUN argument. I am using V2.4.0. > hc Call: hclust(d = dist(mtx2, method = "manh"), method = "average") Cluster method : average Distance : manhattan Number of objects: 9 > plot(hc) > identify(hc) Error in cutree(x, k = 2:MAXCLUSTER) : elements of 'k' must be between 1 and 9 > David Farrar, Ph.D....
2011 Jan 26
0
Fwd: MAtrix addressing
...the find Interval function) that the numbering >>> starts bottom left and goes high top right. >>>> You will find my code below >>> >>> If one wants to take an ordinary r matrix and reorder it in >>> the manner you describe: >>> >>> mtx2 <- mtx[ nrow(mtx):1, ] >>> >>> Whether that is an efficient way to get at the sokution >>> your you programming task I cannot say. It sounds as though >>> it has gotten too convoluted. I was not able to comprehend >>> the overall goal from your proble...