Displaying 20 results from an estimated 2000 matches similar to: "clustering algorithm detail"
2013 May 01
1
help understanding hierarchical clustering
Hi All,
i've problem to understand how to work with R to generate a hierarchical clustering
my data are in a csv and looks like :
idcode,count,temp,sal,depth_m,subs
16001,136,4.308,32.828,63.46,47
16001,109,4.31,32.829,63.09,49
16001,107,4.302,32.822,62.54,47
16001,87,4.318,32.834,62.54,48
16002,82,4.312,32.832,63.28,49
16002,77,4.325,32.828,65.65,46
16002,77,4.302,32.821,62.36,47
2010 Feb 17
2
extract the data that match
Hi r-users,
I would like to extract the data that match. Attached is my data:
I'm interested in matchind the value in column 'intg' with value in column 'rand_no'
> cbind(z=z,intg=dd,rand_no = rr)
z intg rand_no
[1,] 0.00 0.000 0.001
[2,] 0.01 0.000 0.002
[3,] 0.02 0.000 0.002
[4,] 0.03 0.000 0.003
[5,] 0.04 0.000 0.003
[6,]
2006 Sep 09
2
duplication matrix
Dear R-list members,
Just wondering if there is any way to compute the duplication matrix in R.
I tried to search for it but only found functions "xpnd" and "vech".
Basically for a symmetric n by n matrix A, the duplication matrix D_n is
a matrix of dimension n^2 by n(n+1)/2 such that
D_n vech(A)= c(A), where c(A) just vectorizes A.
The duplication matrix is defined on page
2011 Jul 23
1
Achieving 'reverse-Vech' of a matrix
Let say i have a square matrix and applied the 'vech' operator to stack the lower triangular elements into a vector:
> Mat <- matrix(1:25, 5)
> Mat
? ? ?[,1] [,2] [,3] [,4] [,5]
[1,] ? ?1 ? ?6 ? 11 ? 16 ? 21
[2,] ? ?2 ? ?7 ? 12 ? 17 ? 22
[3,] ? ?3 ? ?8 ? 13 ? 18 ? 23
[4,] ? ?4 ? ?9 ? 14 ? 19 ? 24
[5,] ? ?5 ? 10 ? 15 ? 20 ? 25
> Mat[lower.tri(Mat)]
?[1] ?2 ?3 ?4 ?5 ?8 ?9 10 14
2005 Apr 05
4
lists: removing elements, iterating over elements,
I'm writing R code to calculate Hierarchical Social Entropy, a diversity
index that Tucker Balch proposed. One article on this was published in
Autonomous Robots in 2000. You can find that and others through his web
page at Georgia Tech.
http://www.cc.gatech.edu/~tucker/index2.html
While I work on this, I realize (again) that I'm a C programmer
masquerading in R, and its really
2012 Jul 30
2
distance matrix and hclustering
Dear R Users,i am very new to R. I want your help on an issue regarding distance matrix and cluster analysis
i had discharge data of 4 rivers(a,b,c,d) in 4 vectors each having 364 values
> dput(qmu)structure(list(a = c(0.26, 0.25, 0.25, 0.25, 0.24, 0.23, 0.22, 0.21, 0.21, 0.21, 0.2, 0.19, 0.19, 0.19, 0.19, 0.18, 0.18, 0.18, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17,
2006 Nov 09
1
dissimilarity matrices
Dear All,
I have a dissimilarity matrix which I happily convert to a distance object
by running:
X <- as.dist(Y)
and I can happily now run either hclust(X) or agnes(X).
So that the various bits of output are labelled correctly I would dearly
like to be able to give names to the columns and rows of X, as would happen
if I ran:
mydata<-read.table("clipboard",header=T)
2008 Oct 23
15
VEC Operator in R
Can anyone please tell whether there is any R function to act as "VEC" and
"VECH" operator on Matrix? Yes of course, I can write a
user-defined-function for that or else, I can put dim(mat) <- NULL. However
I am looking for some R function.
Your help will be highly appreciated.
Regards,
--
View this message in context:
2008 Mar 06
2
Help with parsing a data file
Hi All,
I need to parse data from a file, example shown below. The first two lines
can be skipped, the third line contains the column names. The next 13 lines
can be skipped. The next line "1991" is a year value, with the following 13
values data for that year. The file then repeats this format with (year, 13
lines of data for that year). I would ideally like to end up with an
2006 Sep 18
2
problems in sourcing R script
Dear list,
First my information:
platform i386-pc-linux-gnu
arch i386
os linux-gnu
system i386, linux-gnu
status
major 2
minor 3.1
year 2006
month 06
day 01
svn rev 38247
language R
version.string Version 2.3.1 (2006-06-01)
Now my question:
How is it possible that a command in an R script is not
2017 Dec 31
1
Perform mantel test on subset of distance matrix
I'm trying to perform a mantel test that ignores specific pairs in my
distance matrices. The reasoning is that some geographic distances
below a certain threshold suffer from spatial autocorrelation, or
perhaps ecological relationships become less relevant that stochastic
processes above a certain threshold.
The problem is that I can't find a way to do it. If I replace values
in either or
2013 May 15
1
x and y lengths differ
I have a problem with R. I try to compute the confidence interval for my
df. When I want to create the plot I have this problem: Error in
xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ.
I try this code:
library(dplR)
df.rwi <- detrend(rwl = df, method = "Spline",nyrs=NULL)
write.table(df.rwi,file="rwi.txt",quote=FALSE,row.names=TRUE)
2009 Jul 21
1
problem with heatmap.2 in package gplots generating non-finite breaks
I have written a wrapper for heatmap.2 called
heatmap.w.row.and.col.clust which auto-generates breaks using
breaks<-round((c(seq(from=(-20 * stddev), to=(20 * stddev))))/20,
digits = 2) #(stddev in this case = 2.5)
This has always worked well in the past but now I am getting an error
that non-finite breaks are being generated. Drilling down, it seems
that my wrapper is generating finite
2010 Jan 04
1
log-normal overlay
Hello,
Using the following lines of code, I created the following graph:
2010 Jan 04
1
log normal overlay
Hello,
Using the following lines of code, I created the following graph:
2007 Oct 22
2
Help interpreting output of Rprof
Hello there,
I am not quite sure how to interpret the output of Rprof (in the following the output I was staring at). I was poking around the web a little bit for documentation but without much success. I guess if I want to figure out what takes so long in my code the 2nd table $by.total and the total.pct column (pct = percent) is the most helpful. What does it mean that [ or [.data.frame is
2012 Jan 07
1
k-means++
Hi everyone -
I know that R is capable of clustering using the k-means algorithm, but can
R do k-means++ clustering as well?
Thanks,
--
Dr. Ferebee Tunno
Assistant Professor
Department of Mathematics and Statistics
Arkansas State University
P.O. Box 70
State University, AR. 72467
ftunno@astate.edu
(870) 329-7710
[[alternative HTML version deleted]]
2012 Sep 29
1
Problems with stepAIC
Dear help community,
I'm a R-beginner and use it for my master thesis.
I've got a mixed model and want to analyse it with lme. There are a lot
Cofactors that coult be relevant. To extract the important ones I want to do
the stepAIC, but always get an error warning.
Structure of my data:
data.frame': 72 obs. of 54 variables:
$ Block : Factor w/ 3 levels
2013 Mar 05
0
permutest
I'm working with capscale and permutest for the first time, and having
trouble getting statistical analyses for more than one constraining
variable. I've read the documentation, but setting first=FALSE or using
by="axis" doesn't seem to be helping. capscale seems to be fine, I receive
output for more than one constrained axis. What am I doing wrong?
2006 Jul 28
2
subset of rows from matrix
Hi all,
I have a dataframe of rownames that I would like to extract from a
larger matrix to form a new matrix. I have tried to use subset, in
this manner
x<-subset(largematrix, rownames$names=largematrix$rownames)
where largematrix is the larger matrix and rownames$names is the
dataframe with the row names of the rows I want to extract from the
larger matrix.
Of course, I get error