ON Canada
-Original Message-
From: a...@walla.co.il
Sent: Wed, 10 Jul 2013 12:49:55 -0700 (PDT)
To: r-help@r-project.org
Subject: Re: [R] PCA and gglot2
Dear John,
Thanks for the help.
I did some minor modifications to your script as I had some problems:
...
pca = PCA(data[,1:4
Hi,
I was trying as well as looking for an answer without success (a bit strange
since it should be an easy problem) and therefore I will appreciate you
help:
My simple script is:
# Loadings data of 5 columns and 100 rows of data
data1-read.csv(C:/…/MyPCA.csv)
pairs(data1[,1:4])
pca1 -
: a...@walla.co.il
Sent: Wed, 10 Jul 2013 06:09:00 -0700 (PDT)
To: r-help@r-project.org
Subject: [R] PCA and gglot2
Hi,
I was trying as well as looking for an answer without success (a bit
strange
since it should be an easy problem) and therefore I will appreciate you
help:
My simple script
The biplot present the data points as numbers. How can I
present the
data point in color (depends on their group-column 5). I
was thinking
about doing it using ggplot2 but I can not succeed. Any
idea how to do
it?
Perhaps the post at
Hi,
Thanks. Fig 4 in the link you provided is what I am looking for.
I still do not know how to implement my data1 and pca1 in the script you
provided as I think it is only a part of a full script.
data1-read.csv(C:/…/MyPCA.csv)
pca1 - princomp(data1[,1:4], score=TRUE, cor=TRUE)
Am I right,
-
From: a...@walla.co.il
Sent: Wed, 10 Jul 2013 11:02:11 -0700 (PDT)
To: r-help@r-project.org
Subject: Re: [R] PCA and gglot2
Hi,
Thanks. Fig 4 in the link you provided is what I am looking for.
I still do not know how to implement my data1 and pca1 in the script you
provided as I
the lines but I
have not looked at it all that carefully.
John Kane
Kingston ON Canada
-Original Message-
From: a...@walla.co.il
Sent: Wed, 10 Jul 2013 11:02:11 -0700 (PDT)
To: r-help@r-project.org
Subject: Re: [R] PCA and gglot2
Hi,
Thanks. Fig 4 in the link you
the lines but I
have not looked at it all that carefully.
John Kane
Kingston ON Canada
-Original Message-
From: a...@walla.co.il
Sent: Wed, 10 Jul 2013 11:02:11 -0700 (PDT)
To: r-help@r-project.org
Subject: Re: [R] PCA and gglot2
Hi,
Thanks. Fig 4 in the link you
Dear John,
Thanks for the help.
I did some minor modifications to your script as I had some problems:
...
pca = PCA(data[,1:4], scale.unit=T, graph=F)
dat1 - data.frame(pca$scores) # creates the data.frame
dat1$items - rownames(data$group) # adds item names
ggplot(dat1,
Hi,
Thanks to ssefick for the ggbiplot tip.
It works fine so I submit a general script thats works for future users.
library(ggbiplot)
data-read.csv(C:/…/MyPCA.csv)
data1-data[,1:4]
my.pca - prcomp(data1, scale. = TRUE)
my.class- data$Group
g - ggbiplot(my.pca, obs.scale = 1, var.scale =
10 matches
Mail list logo