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 <- princo
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 ri
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, aes(pca$ind$coord[
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.scal
Hi,
Is the lda function (R MASS package) “Proportion of trace” is similar to
“proportion of variance explained”in the case of PCA?
How can I store the LD1 and LD2 in two separate variables?
Thanks
--
View this message in context:
http://r.789695.n4.nabble.com/What-is-Proportion-of-trace-
Hi,
I wish to build a GUI for my R script, what are the best and easiest tools
to use and which ones as good documentation or books?
Thanks
--
View this message in context:
http://r.789695.n4.nabble.com/GUI-tools-for-R-tp4673925.html
Sent from the R help mailing list archive at Nabble.com.
Hi,
I've been looking for Image Processing packages without success. I am mainly
interested in image Gray Level Co-occurrence Matrix (GLCM) parameters like
Contrast, Correlation, Energy, Homogeneity.
Is there a package that can do it? Any ideas, comments, etc are welcome.
Thanks.
--
View
Hi,
How can I calculate and mark each group centroid in a linear discriminant
analysis plot (using ggplot2)?
Script:
## originate from
http://r.789695.n4.nabble.com/LDA-and-confidence-ellipse-td4671308.html
require(MASS)
require(ggplot2)
iris.lda<-lda(Species ~ Sepal.Length + Sepal.Width + Peta
Hi,
I have modified a known script to generate a scatterplot matrix:
panel.cor = function(x, y, digits=2, prefix="Rho=", cex.cor)
{
usr = par("usr"); on.exit(par(usr))
par(usr = c(0, 1, 0, 1))
r = abs(cor(x, y, use="pairwise.complete.obs", method = "pearson"))
txt = format(c(r,
Hi,
I used the pairs.panels() in pkg:psych and it is helpful. It saves time.
but if I use this line:
pairs.panels(cfcap[8:11], scale = FALSE, lm=TRUE,ellipses=TRUE, digits = 2
)
The results are:
- The upper.panel does not show the pearson r but the lm data. Furthermore,
can I use the pairwise
Thanks a lot for the answer
--
View this message in context:
http://r.789695.n4.nabble.com/Scatterplot-matrix-Pearson-linear-correlation-and-Density-Ellipse-tp2763552p2953909.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-pr
Hi,
strangely, when I run this script:
panel.cor = function(x, y, digits=2, prefix="r=", cex.cor)
{
usr = par("usr"); on.exit(par(usr))
par(usr = c(0, 1, 0, 1))
r = abs(cor(x, y, use="pairwise.complete.obs", method = "pearson"))
txt = format(c(r, 0.123456789), digits=digits)[1]
r in .jnew("java/io/FileInputStream", file) :
java.io.FileNotFoundException:
Can someone tell me what is the problem? and how to solve it.
Cheers,
Ashz
--
View this message in context:
http://r.789695.n4.nabble.com/Xlsx-and-R-read-problem-tp2998304p2998304.html
Sen
Hi,
Is there a package to perform a sine function fitting to XY data?
Thx,
Ashz
--
View this message in context:
http://r.789695.n4.nabble.com/Sine-function-fitting-tp3000156p3000156.html
Sent from the R help mailing list archive at Nabble.com
Hi,
I have a data set with 3 rows (X=date, Y1=arithmetic mean and Y2=standard
deviation). How can I create a graph(e.g., points) which will show the
+-stdev as well (similar to excel).
Thanks
--
View this message in context:
http://r.789695.n4.nabble.com/points-x-y-mean-and-standard-deviatio
Hi,
Thanks for the tip.
I run this script:
means.cl <- c(82, 79, 110, 136,103)
stderr.cl <- c(8.1,9.2,7.4,1.6,7.6)
plotCI(x = means.cl , uiw = stderr.cl, pch=24)
But how can I connect the mean triangles with a line?
Thanks
--
View this message in context:
http://r.789695.n4.nabble.com/poin
Hi,
I have this script:
dat <- data.frame(X = halistat$Date,Y1 = halistat$avg,Y2 = halistat$stdev)
ggplot(data = dat, aes(x = X, y = Y1, ymin = Y1 - Y2, ymax = Y1 + Y2)) +
geom_point() + # points at the means
geom_line() + # if you want lines between pints
geom_errorbar() # error bars, Y1
Dear All,
I have this script:
dat <- data.frame(Month = hstat$Date,C_avg = hstat$C.avg,C_stdev =
hstat$C.stdev)
ggplot(data = dat, aes(x = Month, y = C_avg, ymin = C_avg - C_stdev, ymax =
C_avg + C_stdev)) +
geom_point() +
geom_line() +
geom_errorbar()
dat <- data.frame(Month = hstat$D
Dear Thierry,
Your solution looks very elgant but I can not find a proper example.
Can you provide me one?
Thx
--
View this message in context:
http://r.789695.n4.nabble.com/ggplot-output-tp3027026p3027108.html
Sent from the R help mailing list archive at Nabble.com.
___
Hi,
Is it possible to do a Matrix Plot and in the cell perform a linear
regression also adding to the cell the r2 and the equation. If so, how?
Thanks,
As hz
--
View this message in context:
http://r.789695.n4.nabble.com/Matrix-Plot-and-linear-regression-tp2321613p2321613.html
Sent from the R
Hi,
I have an excel sheet (already imported to R) with multiple columns and I am
looking for a way in R that will allow me to generate a plot for every
possible pair and its linear regression line/data.
Any tip/idea/script how do to so.
Thanks,
As hz
--
View this message in context:
http://
Hi,
I presume the easy way is using plot and lm.
Thx,
As hz
--
View this message in context:
http://r.789695.n4.nabble.com/Automated-plot-and-linear-regression-line-data-tp2328027p2328372.html
Sent from the R help mailing list archive at Nabble.com.
___
Hi,
I have 20*60 data matrix (with some NAs) and I wish to perfom a Pearson
correlation coefficient matrix as well as simple linear regression equation
and coefficient of determination (R2) for every possible combination. Any
tip/idea/library/script how do to so.
Thanks,
As hz
--
View thi
Hi,
Thanks, the cor() works.
Regarding the simple linear regression equation (mainly, the slope
parameter) and r2. I think I was not writing it well. I need to do it just
for the columns. If I have a, b, c, d columns I wish to compute the relation
of there data, e.g., between a-b, a-c, a-d, b-a
Dear all,
I generated a Correlograms and used the panel.ellipse (confidence ellipse
and smoothed line) option. Is there a way to get instead of the smoothed
line the linear regression?
Thanks,
As hz
--
View this message in context:
http://r.789695.n4.nabble.com/Correlograms-and-linear-regre
Dear Greg,
Thanks for the tip. As I am new in R can you please provide me a script how
do to so. It will help my learning process.
Thanks,
Asher
--
View this message in context:
http://r.789695.n4.nabble.com/Linear-regression-equation-and-coefficient-matrix-tp2329804p2330867.html
Sent from the
Hi,
I have two XY datasets (e.g., longitude and concentrations) who share the
same X scale. How can I make a simple scatterplot which will combine them
both with different colors for the two Y groups? (plot and xyplot solutions
are fine with me).
Thanks in advance.
Cheers
--
View this messa
tion(x, y, type, ...) {
panel.superpose(x, y, type="l", ...)
lpoints(x, y, pch=16, col="white", cex=2)
panel.superpose(x, y, type="p",...)
},
par.settings = sp,
auto.key = list(columns = 2, lines = TRUE)))
I will be
display all the months in the X axis text/labels?
how can I display only January, April, July and October the months in the X
axis text/labels?
Thanks,
Ashz
PS
axis.text.x = theme_text(angle=90)
and
scale_x_date(format = "%b-%Y")
--
View this message in context:
http://r.789695.n4.nabbl
Hi,
I am using this script to read a xlsx file to a data frame:
library(xlsx)
File <- file.path("d:", "car ", "car95-99.xlsx")
B_car <- read.xlsx(File, "raw_data")
Car2x <- data.frame(month = B_car$Date,Ch = B_car$Ch.des,
lat=B_car$Latitude)
The last row in the data.frame is always NA, how can I
Hi,
Based on some modification that I did to the R Cookbook Graphs Scatterplots
code, link:http://wiki.stdout.org/rcookbook/Graphs/Scatterplots%20(ggplot2)
I have some questions and I will appreciate a help:
- How do I change the legend title?
- How can I change the for each linear r
Dear all,
How can I covert lm data to text in the form of "y=ax+b, r2" and how do I
calculate R-squared(r2)?
Thanks.
Code:
x=18:29
y=c(7.1,7,7.7,8.2,8.8,9.7,9.9,7.1,7.2,8.8,8.7,8.5)
res=lm(y~x)
--
View this message in context:
http://r.789695.n4.nabble.com/Howto-convert-Linear-Regression-dat
Dear All,
The following code save my graphs as pdf:
pdf("j:/mix.pdf", width = 18, height = 16)
grid.newpage()
pushViewport(viewport(layout = grid.layout(3,1)))
vplayout <- function(x, y)
viewport(layout.pos.row = x, layout.pos.col = y)
print(Aplot, vp = vplayout(1, 1))
print(Bplot, vp
Dear All,
I have several objects (imported from excel via using “xlsx”) with the field
names: Month/Year, X, Y1, Y2, Y3.
What is the best library/way to generate a graph which will be consist of
multiple plots (Month/Year) that each contain the X, Y1, Y2, Y3 dataset.
Thanks a lot.
Cheers,
Asher
Dear jholtman,
Thanks for the reply & sorry for the been unclear before.
My desire graph is to have multiply plots showing Y1,Y2,Y3 with the same X,
were each plot is month-year (e.g., 5-2001, 6-2001, etc). It ill be great if
each Y can have a different line and point style.
The Lattice graph
Dear All,
I have some time series data where X=month and Y=nutrient concentration (I
can have several concentration data for one month). Is there a way to fit
for it an Harmonic Function. Is there a package, script,etc which I can use?
Thx
--
View this message in context:
http://r.789695.n4.
36 matches
Mail list logo