similar to: xtable prcomp

Displaying 20 results from an estimated 2000 matches similar to: "xtable prcomp"

2011 Jun 30
2
sdev value returned by princomp function (used for PCA)
Dear all, I have a question about the 'sdev' value returned by the princomp function (which does principal components analysis). On the help page for princomp it says 'sdev' is 'the standard deviations of the principal components'. However, when I calculate the principal components for the USArrests data set, I don't find this to be the case: Here is how I
2012 Feb 26
1
Sweave Print xtable
Hi, I'm working with Sweave and I have some trouble generating table. The R code is: print(xtable(myTable, caption ="", label="tab:myTab", digits=3), tabular.environment='tabular', floating=TRUE, caption.placement="top",size="\\scriptsize") and the resulting LaTeX table is: \begin{table}[ht] \begin{center} \caption{Principal
2011 Aug 09
2
S4 classes, some help with the basics
Hi All, I have tried to find an answer within documentation, but I cannot: o How can call a class "slot" without knowing the name a priori? E.g., let's say I use the "pcaMethods" library to create a "pcaRes" object. How can I call parts of that object without using the specific names of the object in the call? example code: library(pcaMethods)
2017 Sep 08
2
quote()/eval() question
Dear list, For a reason it would take me long to explain, I need to do something along the lines of what's shown below -- i.e., create an object from dplyr::summarise, and then evaluate it on a data frame. I know I could directly do: df %>% dplyr::summarise(x1_mean = mean(x1)) but this is not what I'm looking for. library(dplyr) df <- data.frame(x1 = rnorm(100), x2 =
2010 Apr 16
1
PCA scores
Hi all, I have a difficulty to calculate the PCA scores. The PCA scores I calculated doesn't match with the scores generated by R, mypca<-princomp(mymatrix, cor=T) myscore<-as.matrix(mymatrix)%*%as.matrix(mypca$loadings) Does anybody know how the mypca$scores were calculated? Is my formula not correct? Thanks a lot! Phoebe [[alternative HTML version deleted]]
2009 May 06
4
tapply changing order of factor levels?
Hi, Does tapply change the order when applied on a factor? Below is the code I tried. > mylevels<-c("IN0020020155","IN0019800021","IN0020020064") >
2012 Dec 18
1
xtable with psych objects
Hello: I s there a way to use xtable with objects from the psych package, particularly principal()? Is there a difference between princomp and principal? xtable seems to play better with princomp. Thank you. Yours, Simon Kiss ********************************* Simon J. Kiss, PhD Assistant Professor, Wilfrid Laurier University 73 George Street Brantford, Ontario, Canada N3T 2C9
2013 Jul 10
3
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 is: # Loadings data of 5 columns and 100 rows of data data1<-read.csv("C:/?/MyPCA.csv") pairs(data1[,1:4]) pca1 <- princomp(data1[,1:4], score=TRUE, cor=TRUE) biplot(pca1) The biplot present the data
2009 May 26
2
Using package "exams" and xtable
Hello, I am trying to use the package "exams" to construct problem sets. I have constructed an exercise which generates a list of integers and asks the student to compute the median. rx is the vector of n numbers >str(rx) num [1:16] 21 9 8 18 4 12 17 2 9 7 ... I want to print out the entire vector as part of the problem. When I use \Sexpr(rx) only the first value (in this case
1998 Aug 26
0
prcomp & princomp - revised
My previous post about prcomp and princomp was done in some haste as I had long ago indicated to Kurt that I would try to have this ready for the June release, and it appeared that I would miss yet another release. I also need to get it out before it becomes hopelessly buried by other work. Brian Ripley kindly pointed out some errors, and also pointed out that I was suggesting replacing some
2012 Nov 15
1
Can't see what i did wrong..
with pred.pca<-predict(splits[[i]]$pca,trainingData at samples)[,1:nPCs] dframe<-as.data.frame(cbind(pred.pca,class=isExplosive(trainingData,2))); results[[i]]$classifier<-ksvm(class~.,data=dframe,scaled=T,kernel="polydot",type="C-svc", C=C,kpar=list(degree=degree,scale=scale,offset=offset),prob.model=T) and a degree of 5 i get an error of 0 reported by the ksvm
2006 Jun 16
2
bug in prcomp (PR#8994)
The following seems to be an bug in prcomp(): > test <- ts( matrix( c(NA, 2:5, NA, 7:10), 5, 2)) > test Time Series: Start = 1 End = 5 Frequency = 1 Series 1 Series 2 1 NA NA 2 2 7 3 3 8 4 4 9 5 5 10 > prcomp(test, scale.=TRUE, na.action=na.omit) Erro en svd(x, nu = 0) : infinite or missing values in 'x'
2004 Jan 15
2
prcomp scale error (PR#6433)
Full_Name: Ryszard Czerminski Version: 1.8.1 OS: GNU/Linux Submission from: (NULL) (205.181.102.120) prcomp(..., scale = TRUE) does not work correctly: $ uname -a Linux 2.4.20-28.9bigmem #1 SMP Thu Dec 18 13:27:33 EST 2003 i686 i686 i386 GNU/Linux $ gcc --version gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) > a <- matrix(rnorm(6), nrow = 3) > sum((scale(a %*% svd(cov(a))$u, scale
2009 Dec 23
1
prcomp : plotting only explanatory axis arrows
Dear all, I have a very large dataset (1712351 , 20) and would like to plot only the arrows that represent the contribution of each variables. On the sample below I woild like to plot only the explanatory variables (Murder, Assault..) and not the sites. prcomp(USArrests) # inappropriate prcomp(USArrests, scale = TRUE) prcomp(~ Murder + Assault + Rape, data = USArrests, scale = TRUE)
2009 Oct 19
2
What is the difference between prcomp and princomp?
Some webpage has described prcomp and princomp, but I am still not quite sure what the major difference between them is. Can they be used interchangeably? In help, it says 'princomp' only handles so-called R-mode PCA, that is feature extraction of variables. If a data matrix is supplied (possibly via a formula) it is required that there are at least as many units as
2005 Aug 03
3
prcomp eigenvalues
Hello, Can you get eigenvalues in addition to eigevectors using prcomp? If so how? I am unable to use princomp due to small sample sizes. Thank you in advance for your help! Rebecca Young -- Rebecca Young Graduate Student Ecology & Evolutionary Biology, Badyaev Lab University of Arizona 1041 E Lowell Tucson, AZ 85721-0088 Office: 425BSW rlyoung at email.arizona.edu (520) 621-4005
1998 Apr 02
2
prcomp
I've noticed that the arguments and result list of prcomp in the mva package (with 61.1) are not quite the same as in the Blue Book and in Splus. Is this intentional or can I change it? If I change it who should I send the code to? Paul Gilbert -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read
2007 Jun 14
2
Difference between prcomp and cmdscale
I'm looking for someone to explain the difference between these procedures. The function prcomp() does principal components anaylsis, and the function cmdscale() does classical multi-dimensional scaling (also called principal coordinates analysis). My confusion stems from the fact that they give very similar results: my.d <- matrix(rnorm(50), ncol=5) rownames(my.d) <-
2010 Jun 16
2
Accessing the elements of summary(prcomp(USArrests))
Hello again, I was hoping one of you could help me with this problem. Consider the sample data from R: > summary(prcomp(USArrests)) Importance of components: PC1 PC2 PC3 PC4 Standard deviation 83.732 14.2124 6.4894 2.48279 Proportion of Variance 0.966 0.0278 0.0058 0.00085 Cumulative Proportion 0.966 0.9933 0.9991 1.00000 How do I access the
2008 Feb 10
1
prcomp vs. princomp vs fast.prcomp
Hi R People: When performing PCA, should I use prcomp, princomp or fast.prcomp, please? thanks. Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodgess at gmail.com