Displaying 20 results from an estimated 2000 matches similar to: "Convert full matrix back to lower triangular matrix"
2011 Nov 15
5
Convert back to lower triangular matrix
Given a vector;> ab = seq(0.5,1, by=0.1)> ab[1] 0.5 0.6 0.7 0.8 0.9 1.0
The euclidean distance between the vector elements is given by the lower triangular matrix > dd1 = dist(ab,"euclidean")> dd1 1 2 3 4 52 0.1 3 0.2 0.1 4 0.3 0.2 0.1 5 0.4 0.3 0.2 0.1 6 0.5 0.4 0.3 0.2 0.1
Convert the lower triangular matrix to a full
2005 Mar 01
2
almost lower triangular matrices
I have output from a program which produces a distance matrix I want to
read into a clustering program in R.
The output is a .txt file and is 'almost' lower triangular in the sense
that it is just the triangle below the diagonal.
So for example a 4-by-4 distance matrix appears as,
1
2 3
4 5 6
i.e. it looks like a lower triangular of a 3-by3.
I thought I might be able
2012 Feb 15
3
built a lower triangular matrix from dataframe
Hello!
I'm trying to build a lower triangular matrix (with zeros in the diagonal)
from a particular dataframe.
The matrix I have to construct has 203 rows and 203 columns and that makes
20503 values to be included within (that's why I can't do it manually).
To illustrate the dataframe I have, I'll give you an example of a dataframe
and matrix with dimensions 6x6 (to make it
2011 Oct 14
3
Split a list
I have a list of dataframes i.e. each list element is a dataframe with three columns and differing number of rows. The third column takes on only two values. I wish to split the list into two sublists based on the value of the third column of the list element.
Second issue with lists as well. I would like to reduce each of the sublist based on the range of the second column, i.e. if the range of
2009 Sep 12
2
Triangular distribution for kernel regression
Hello,
I am trying to get fitted/estimated values using kernel regression and a
triangular kernel. I have found packages that easily fit values from a
kernel regression (e.g. ksmooth) but do not have a triangular distribution
option, and density estimators that have triangular distribution options
that I can't seem to use to produce estimated values (e.g. density). Any
help is appreciated.
2012 May 16
3
triangular matrices input/output
Hi,
Is there any package that deals with triangular matrices?
Say ways of inputting an upper (lower) triangular matrix?
Or convert a vector of length 6 to an upper (lower) triangular matrix (by
row/column)?
Thanks!
-----
######################
PhD candidate in Statistics
Big R Fan
Big LEGO Fan
Big sTaTs Fan
######################
--
View this message in context:
2011 Nov 28
2
Principal componet plot from lower triangular matrix file
Hi,
I have a comma separated file with element names in first column like shown
below :
Name_1,0
Name_2,0.8878,0
Name_3,0.6777,0.7643,0
Name_4,0.9844,0.1234,0.1414,0
Original data is a 10000x10000 symmetric matrix (600 MB). To reduce file
size, I have minimized matrix to only lower triangle. Is there a (memory)
efficient way to 1) read file 2) compute first and second principal
components and
2005 Jul 12
2
simple question: reading lower triangular matrix
Dear list,
I will like to learn how to read a lower triangular matrix in R. The
input file *.txt have the following format:
A B C D E
A 0
B 1 0
C 2 5 0
D 3 6 8 0
E 4 7 9 10 0
How this can be done?
Thanks in advance for your help
Rog??rio
2011 May 13
2
How to store a triangular matrix
Hello, I want to create a triangular matrix and only keep the lower triangle entries without having to allocate memory for the whole matrix, is there any way I can do something like
A<-matrix(data, nrow=50)
but for a triangular matrix?
Thanks
ERV
[[alternative HTML version deleted]]
2010 Dec 22
2
Fitting a Triangular Distribution to Bivariate Data
Hello,
I have some xy data which clearly shows a non-monotonic, peaked
triangular trend. You can get an idea of what it looks like with:
x<-1:20
y<-c(2*x[1:10]+1,-2*x[11:20]+42)
I've tried fitting a quadratic, but it just doesn't the data-structure
with the break point adequately. Is there anyway to fit a triangular
or 'tent' function to my data in R?
Some sample code
2010 Feb 16
3
Triangular filled contour plot
Hi all,
I am working on a filled contour plot which shows a triangular matrix data
set (as shown below). Is there a possibilty to draw a triangular filled
contour in a equilateral triangle (like a ternary plot)?
Thanks in advance
Johannes
http://n4.nabble.com/file/n1557386/Bild3.png
--
View this message in context: http://n4.nabble.com/Triangular-filled-contour-plot-tp1557386p1557386.html
2013 Jun 16
1
trying to fit a thin plate spline to a triangular plot
Hi
Has anyone tried to fit a thin plate spine to a triangular plot before? I'm having trouble working out a piece of code to make it possible with three axes. I have done it before with two axes.
I've found a package I prefer that makes triangular plots (plotrix) using the triax.plot() function. An example of some data and the plot follows:
graph.data<-data.frame(a=c(9,6.2,
2006 Apr 03
2
Ternary or Triangular Plots (soil texture triangle plot)?
Hi,
I am trying to create a triangular plot to show the 'composition' of a
set of items with three variables (historically the percent sand, silt
and clay in soil).
So far I have tried the 'soil texture triangle plot' in the package
plotrix and the 'ternary or triangular plots' in the package cwhtool
(cwhmisc). Both have strengths and weaknesses, but neither has a
2001 Jan 09
2
PAM clustering (using triangular matrix)
Hi,
I'm trying to use a similarity matrix (triangular) as input for pam() or
fanny() clustering algorithms.
The problem is that this algorithms can only accept a dissimilarity
matrix, normally generated by daisy().
However, daisy only accept 'data matrix or dataframe. Dissimilarities
will be computed between the rows of x'.
Is there any way to say to that your data are already a
2007 Jul 05
1
generating lower triangular matrix
Hi,
I would like to generate below triangular matrix for some a.
0
0
0
0
0
0
1
0
0
0
0
0
a
1
0
0
0
0
a^2
a
1
0
0
0
a^3
a^2
a
1
0
0
a^4
a^3
a^2
a
1
0
What's an efficient way to do this? (this matrix being KxK, K very
large)
Thanks
Zava
--------------------------------------------------------
This is not an offer (or solicitation of an offer) to buy/se...{{dropped}}
2010 Feb 25
2
Rearranging entries in a matrix
I have a matrix, called data. I used the code below to rearrange the data such that the first column remains the same, but the y value falls under either columns 2, 3 or 4, depending on the value of z. If z=1 for example, then the value of y will fall under column 2, if z=2, the value of y falls under column 3, and so on.
data
x y z
[1,] 50 13 1
[2,] 14 8 2
[3,] 3 7 3
[4,] 4 16 1
[5,] 6
2010 Feb 28
4
Reducing a matrix
I wish to rearrange the matrix, df, such that all there are not repeated x values. Particularly, for each value of x that is reated, the corresponded y value should fall under the appropriate column. For example, the x value 3 appears 4 times under the different columns of y, i.e. y1,y2,y3,y4. The output should be such that for the lone value of 3 selected for x, the corresponding row entries
2011 Sep 26
2
Triangular matrix upper to down
Hi,
suppose that we have a triangular upper matrix A
test <- matrix(ncol = 4, nrow = 4)
test[1, ] <- c(NA,1,1,1)
test[2, ] <- c(NA,NA,1,1)
test[3, ] <- c(NA,NA,NA,1)
test[4, ] <- c(NA,NA,NA,NA)
I know how quickly set diagonal value diag(test) <- 1. But how quickly set
down value i.e. matrix is symmetrical? Is there in r project any quickly
function?
Thanks,
Best
Marcin
2005 Oct 02
2
convering upper triangular matrix into vector
Hi
I have two symmetrical distance matrices and want to compute the correlation
coefficient between them (after turning them into vectors).
Is there a way of selecting only the upper triangular part of each matrix, then
convert this into a vector so I can compute the correlation?
Many Thanks
Eleni Rapsomaniki
2009 Feb 11
4
Efficent way to create an nxn upper triangular matrix of one's
The code below create an nxn upper triangular matrix of one's. I'm
stuck on finding a more efficient vectorized way - Thanks. --Dale
n <- 9
data <- matrix(data=NA, nrow=n, ncol=n)
data
for (i in 1:n) {
data[,i] <- c(rep(1,i), rep(0,n-i))
}
data