Displaying 20 results from an estimated 6000 matches similar to: "Reading distance matrices"
2009 Jun 10
2
filled.contour as image
Hi,
Is there a way to make the filled.contour() function produce a plot similar to the image() function? i.e. not have smooth contours but rather distinct "squares" corresponding to the different cells of the matrix. The reason I ask is because since image doesn't have an option to display colour bars it is a lot less useful.
Cheers
Muri Soares
Department of Maths and Applied
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
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
2007 Oct 22
1
grouping rows into bin ranges
Hi everyone,
I have a matrix that contains 1000 replicates of a sample of a list of values. I want to group each row (row=replicate) into my defined bin ranges and then calculate the mean and stdev for each of the bin ranges (so I will have 1000 rows but ncol=number of bin ranges).
I don't know how to group rows in a matrix matrix according to another vector (which is what I think I need to
2007 Dec 07
1
Adding a subset to a glm messes up factors?
Hi everyone,
I have a problem with running a glm using a subset of my data. Whenever I choose a subset, in the summary the factors arent shown (as if the variable was a continuous variable). If I dont use subsets then all the factors are shown. I have copied the output from summary for both cases.
Thanks for the help,
Muri
> model<-glm(log(cpue)~year,family=gaussian)
Call:
glm(formula =
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]]
2009 Dec 18
1
Numerical Integration
Dear @ll. I have to calculate numerical integrals for triangular and trapezoidal figures. I know you can calculate the exactly, but I want to do it this way to learn how to proceed with more complicated shapes. The code I'm using is the following:
integrand<-function(x) {
print(x)
if(x<fx[1]) return(0)
if(x>=fx[1] && x<fx[2]) return((x-fx[1])/(fx[2]-fx[1]))
2011 Feb 09
2
Generate multivariate normal data with a random correlation matrix
Hi All.
I'd like to generate a sample of n observations from a k dimensional
multivariate normal distribution with a random correlation matrix.
My solution:
The lower (or upper) triangle of the correlation matrix has
n.tri=(d/2)(d+1)-d entries.
Take a uniform sample of n.tri possible correlations (runi(n.tr,-.99,.99)
Populate a triangle of the matrix with the sampled correlations
Mirror the
2011 Mar 08
1
R Commander QQ Plot with triangular distribution
I am attempting to use the R Commander Graphs Quantile-Comparison
functionality on a dataset, to compare with a triangular distribution.
I have the package triangle. My question is on the syntax of how
to specify the parameters of the theoretical distribution in the
Parameters field of the dialog box. For example, the theoretical
distribution has min of 3000, max of 5000, mode of 4000. When
2007 Nov 29
1
?eigen documentation suggestion
from ?eigen
symmetric: if 'TRUE', the matrix is assumed to be symmetric (or
Hermitian if complex) and only its lower triangle is used. If
'symmetric' is not specified, the matrix is inspected for
symmetry.
I think that could mislead a naive reader as it suggests that, with symmetric=TRUE,
the result of eigen() (vectors and values) depends only on
2011 Nov 16
2
Conversion of symmetry matrix into a vector
Dear R users,
I am not good in R-language programming. So, i need your help.
I want to convert my lower-triangle value of symmetry matrix into a vector with their row and column name.
I found a function called "sm2vec" in "corpcor" package but it give only a vector of values but not row and column names. But i also want ROW and COLUMN name together with their corresponding
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
2012 Aug 27
1
RGL plot : lighting problem when triangle3d and persp3d are used in the same plot
Dear all,
I have tried to plot a triangular matrix with the function persp3d(rgl).
for example
z=rbind(c(1,NA,NA,NA),c(5,3,NA,NA),c(4,2,9,NA),c(8,6,5,11))
x=1:4
y=1:4
persp3d(x,y,z,color="gray")
The two extreme points are not plotted (value=1 and value=10). It seems
because the half of the matrix have 'NA' and perp3d need planar
quadrilateral face. So I decided to use the
2009 Sep 11
1
transposing a distance matrix in R
Hi Jeannine,
I'm just forwarding this Q&A back to the r-help list, you'll get more
eyes on it and other people might have better solutions.
Answers inline:
On Sep 11, 2009, at 12:25 PM, Jeannine Cavender-Bares wrote:
> Dear Steve,
>
> Greetings! You helped me earlier this summer with an R question in
> response to a message Brian McCarthy put out on the listserv. I
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
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
2007 Oct 09
1
Plotting two distance matrices
Hi all,
I'm trying to plot two distance matrices against each other (74x74,phylogenetic distance and phenotypic distances). However R gives an error message:"Error in plot.new() : figure margins too large".
Is it because I have too many points to plot?
Thanks in advance,
Muri
____________________________________________________________________________________
2004 Jan 12
1
Matrix indexes
Two questions about matrix indexing:
Is is correct that V <- V[lower.tri(V, diag=TRUE)] returns the lower
triangular of matrix V, that is: all elements above diagonal are set to zero? I
understand that the triangle of matrix elements of V for which lower.tri is
TRUE are returned while the others (above diagonal) are set to zero (or NA ???).
If D and B are vectors of logicals,
what
1998 Dec 04
1
contour labelling [was "Re: image ()"]
> From: Bill Simpson <wsimpson at uwinnipeg.ca>
> Subject: Re: contour labelling [was "Re: [R] image ()"]
> MIME-Version: 1.0
>
> > We may be missing the crux here: was it to have a means of
> > displaying such surfaces?
>
> Yes, bang on. I knew of the
> existence of the Delaunay code in the R libraries. Yes I want
> to make a picture that
2001 Oct 05
2
Reading in data in a triangle
I have plain-text data in lower triangular form that I want to read in. Does
anyone know of an easy way to do this?
______________________________________________________________________
Stuart Luppescu -=-=- University of Chicago
$(B:MJ8$HCRF`H~$NIc(B -=-=- s-luppescu at uchicago.edu
http://www.consortium-chicago.org/people/sl.html
http://musuko.uchicago.edu/pubkey.asc for PGP