Displaying 20 results from an estimated 110 matches similar to: "How to use 'prcomp' with CLUSPLOT?"
2002 Mar 28
1
extracting non-NA columns from a data frame
I'm clustering using kmeans, and it doesn't accept NA. if NA occurs in a
column of the data frame, it occurs in every column, including column 1.
they say that a (good) programmer can write FORTRAN in any language, so I
came up with this, where tbl is the data frame containing NA -
> newtbl<-NULL
> for (i in 1:length(tbl)){if (!is.na(tbl[1,i])){
+ newtbl<-if
2013 Apr 09
0
How does clusplot exactly make use of cmdscale?
Dear people,
I used clusplot to plot a partition result. The partition result was from
pamk with a distance object as input. Then I applied cmdscale on the same
distance object for coordinates to make another scatterplot.
My problem is this: the coordinates from the cmdscale calculation, though
with the same shape, were different in scale and rotation from the scatter
plot yielded by clusplot.
2011 Dec 06
1
Problem with clusplot
Dear all
I'm trying to run a cluster analysis with R
Here are the commands:
mydata <- na.omit(matrix) # listwise deletion of missing
mydata <- scale(matrix) # standardize variables
fit <- kmeans(mydata, 8) # 8 cluster solution
# get cluster means
aggregate(mydata,by=list(fit$cluster),FUN=mean)
# append cluster assignment
mydata <- data.frame(mydata, fit$cluster)
2005 May 23
1
Can't reproduce clusplot princomp results.
Dear R folk:
Perhaps I'm just dense today, but I am having trouble reproducing the
principal components plotted and summarized by clusplot. Here is a brief
example using the pluton dataset. clusplot reports that the first two
principal components explain 99.7% of the variability. But this is not what
princomp is reporting. I would greatly appreciate any advice.
With best regards,
-- Tom
2011 Sep 23
0
Clusplot axes
I am a relative novice with R and am having some difficulty using 'clusplot'
(package Cluster).
I have performed PCA analysis (using vegan) on a large set of morphometric
measurements and revealed up to 4 principal components. To examine the
grouping of the data I have used PAM followed by clusplot to visualise the
clusters. My problem is that I would like to see the clusters plotted on
2009 Aug 18
0
Help with identify() points on a PAM clusplot
I created a clusplot from PAM results. It represents how signals have been classified.
Signals are identified by a numerical label.
My trial distance matrix is made up of 10 rows, one for eacjh signal.
I assigned the signals iidentifiers as rownames of the distance matrix.
rwn
[1] "1104" "1332" "2057" "2425" "2483" "2530"
2007 Oct 04
0
??clusplot
Hi there,
I want to do classify some 2-dimensional points into four clusters by
pam() in the cluster package. However, I encountered some problems.
1. How can I change the "xlab" and "ylab" instead of the default
"Component 1" and "Component 2"? When I put "xlab" option in the
function, it always says "formal argument "xlab"
2009 Jan 31
1
Extracting coordinates for cluster::clusplot()
Dear Friends,
require(cluster)
x <- rbind(cbind(rnorm(10, 0, 0.5), rnorm(10, 0, 0.5)),
cbind(rnorm(15, 5, 0.5), rnorm(15, 5, 0.5)))
plot(pp <- pam(x, 2), which.plots = 1)
How can I extract the coordinates used in the plot?
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
Postal Address:
P.O.Box 400400, Charlottesville, VA 22904-4400
2002 Jan 07
3
cluster - clusplot.default (PR#1249)
The following code in clusplot.default (package cluster) is in error:
x1 <- cmdscale(x, k = 2, eig = TRUE)
var.dec <- sum(x1$eig)/sum(diag(x1$x))
if (var.dec < 0)
var.dec <- 0
if (var.dec > 1)
var.dec <- 1
x1 <- x1$points
x1 has components with names "points" and "eig", not "x", so
2012 Jul 06
4
convert a table
I have my data in a table
table <- table(test2$Filename, test2$PREDICT)
I need to convert this table so it keeps the same structure, but is a
different format. The current output is count data by Filename and I want to
get the max for each Filename.
Columns are:
Filename, 1, 2, 3, 4, 5, 6, 7
When I try to convert it to a data.frame it reverts to Var1(Filename),
Var2(1:7), Freq.
My end goal
2003 Apr 18
2
Question about PAM clustering method
Hello everyone. I just started learning R for clustering analysis in my
research project. I tried k-means method and PAM method, both of which
were properly processed with my data. I have some questions about PAM
graphical output.
Suppose to do the commands shown below;
pm<-pam(D, 6)
plot(pm)
I got two charts after prompted. In the first chart, 6 oval clusters are
drawn together
2008 Mar 06
2
Clustering large data matrix
Hello,
I have a large data matrix (68x13112), each row corresponding to one
observation (patients) and each column corresponding to the variables
(points within an NMR spectrum). I would like to carry out some kind of
clustering on these data to see how many clusters are there. I have
tried the function clara() from the package cluster. If I use the matrix
as is, I can perform the clara
2003 Feb 05
1
Package: cluster -- plot.partition() change title: main=""
Dear R-list members,
I am using the cluster package and by the generation of plot.partition I ran
into the problem that an alternative title overlaps the default title.
> plot.partition(clara.14,which.plot=2,stand=TRUE, main="Silhouette plot of
14 clusters")
The manual states that all optional arguments for clusplot.default may also
be supplied to plot.partition(). Altering the
2005 Apr 20
1
make check failure -- R 2.1.0 Windows XP SP2
I compiled R 2.1.0 under Windows XP SP2 as a preliminary to rebuilding a
custom package for use with R 2.1.0. The compile completed successfully,
and I was able to run demo(graphics) successfully. But make check and
make check-recommended fail.
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 1.0
year 2005
2010 Oct 17
0
make error for R 2.13.0
Hi dear all
It's the first time for me to install a developmental version of R, I came
across following errors, my system is
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS"
I downloaded the dev version of R in cran R source, and downloaded the
recommended packages by using wget as described in R manual, and run
2004 Sep 24
1
Cannot build cluster_1.9,6 under R 2.0.0 beta Sep 21
Doing the normal build process [1] for a first time with a R 2.0.0 snapshot
-- the Sep 21 version I uploaded to Debian's 'experimental' section two days
ago, ended in failure. The package in question is cluster 1.9.6 which should
be 2.0.0-ready.
The (partial) log follows:
-----------------------------------------------------------------------------
[...]
g77 -mieee-fp -fPIC -g -O2
2003 Feb 21
1
Help Var passing in function
First thanks to the fast answer regarding the "Clustplot problem"...
Regarding a new problem:
for (i in 1:5)
{
z <- clara(adata, i)
plot(z)
}
in the above code in the plot screen I get something like:
clusplot(clara(x=adata,i)) in title
in the 2nd type of plot I get
silhouete plot of clara(x=adata,k=i,samples=50)
How can I pass the real value to
2006 Feb 27
1
clustering
Hi there,
Sorry for the double email. Does R have the packages for the following
clustering methods? And if it does, what the commands for them?
1. SOM (Self-organization map)
2. Graph partitioning:
3. Neural network
4. Probability Binning
Thank you very much!
Linda
[[alternative HTML version deleted]]
2006 May 09
1
Convert Text File Data into *.RData
Dear R Users,
It works fine. while i read the dataset from the text file. (refered R-data
import -export*.pdf)
> read.table("c:\\DataES.txt")
V1 V2
1 ACW261 33
2 ACW311 7
3 ACW321 31
4 ACW342 39
5
6
7
Now my question is how do i /*convert text file Data into *.RData* which i
can use as a dataset/data.matrix whereby
i can use it for clusplot.
Thanks in Advance,
JJ
---
2012 Feb 23
2
Advice on exploration of sub-clusters in hierarchical dendrogram
Dear R user,
I am a biochemist/bioinformatician, at the moment working on protein
clusterings by conformation similarity.
I only started seriously working with R about a couple of months ago.
I have been able so far to read my way through tutorials and set-up my
hierarchical clusterings. My problem is that I cannot find a way to obtain
information on the rooting of specific nodes, i.e. of