Re: [R] centroid of diamond

2014-03-14 Thread Jim Lemon
On 03/14/2014 08:19 PM, al Vel wrote: Hi, Exactly the matrix transformation is the one that pasted in my first mail. That is here: new_point <- function(x1, x2, y1, y2, grad=1.73206){ b1 <- y1-(grad*x1) b2 <- y2-(-grad*x2) M <- matrix(c(grad, -grad, -1,-1), ncol=2) intercepts <- as.matrix(c(b1,b

Re: [R] centroid of diamond

2014-03-14 Thread al Vel
Hi, Exactly the matrix transformation is the one that pasted in my first mail. That is here: new_point <- function(x1, x2, y1, y2, grad=1.73206){ b1 <- y1-(grad*x1) b2 <- y2-(-grad*x2) M <- matrix(c(grad, -grad, -1,-1), ncol=2) intercepts <- as.matrix(c(b1,b2)) t_mat <- -solve(M) %*% intercep

Re: [R] centroid of diamond

2014-03-14 Thread Jim Lemon
On 03/14/2014 07:05 PM, al Vel wrote: Hi, I was very clear in the mail that i want to create a four edged Barycentric diagram like Ternary plot (like the rhombus in the piper diagram (http://en.wikipedia.org/wiki/Piper_diagram)). The idea is to graphically depicts the ratios of the four variabl

Re: [R] centroid of diamond

2014-03-14 Thread al Vel
Hi, I was very clear in the mail that i want to create a four edged Barycentric diagram like Ternary plot (like the rhombus in the piper diagram ( http://en.wikipedia.org/wiki/Piper_diagram)). The idea is to graphically depicts the ratios of the four variables as positions in an rhombus/diamond s

Re: [R] centroid of diamond

2014-03-13 Thread Jim Lemon
On 03/14/2014 06:03 AM, al Vel wrote: Hello R users, I am trying to make a baricentric diagram like the ternary plot, but with 4 edges. I want to know how to calculate the centroid of the diamond. The 4 edges are A, B, C, D. If value of A=B=C=D, then the point should be at the centre of the diamo

Re: [R] centroid of diamond

2014-03-13 Thread Rolf Turner
Your question makes absolutely no sense at all. See inline below. On 14/03/14 08:03, al Vel wrote: Hello R users, I am trying to make a baricentric diagram like the ternary plot, but with 4 edges. I want to know how to calculate the centroid of the diamond. Which centroid? A "diamond" (conv

[R] centroid of diamond

2014-03-13 Thread al Vel
Hello R users, I am trying to make a baricentric diagram like the ternary plot, but with 4 edges. I want to know how to calculate the centroid of the diamond. The 4 edges are A, B, C, D. If value of A=B=C=D, then the point should be at the centre of the diamond. If A>B and B=C=D=0, Then the point s