[R] Where are the PCA outputs?

WRAY NICHOLAS nicholas.wray at ntlworld.com
Mon Sep 12 14:56:46 CEST 2016


Hi R Folk  I have been kicking some data around and one thing has been to try a
PC analysis  on it, but whereas in the online examples I've looked at the prcomp
function gives a set of five outputs when I use the prcomp function it only
gives me a set of standard deviations and the rotation matrix

My data (pcl) is this:

resmat.3...2. resmat.3...3. resmat.3...4.
1     0.08749276   0.015706470         0.259
2     0.08749276   0.039266176         0.198
3     0.10630841   0.047119411         0.235
4     0.25307047   0.062825881         0.374
5     0.14393971   0.117798527         0.534
6     0.23049169   0.023559705         0.355
7     0.15052518   0.007853235         0.179
8     0.09784137   0.031412940         0.219
9     0.09878215   0.039266176         0.301
10    0.14111736   0.157064702         0.285
11    0.03951286   0.015706470         0.036
12    0.16181457   0.125651762         0.324
13    0.13359110   0.031412940         0.304
14    0.08278885   0.031412940         0.221
15    0.08561120   0.023559705         0.207
16    0.12042015   0.039266176         0.194
17    0.13359110   0.047119411         0.164
18    0.08937433   0.047119411         0.216
19    0.12700562   0.023559705         0.230

the output is then
> prcomp(pcl,scale.=T)
Standard deviations:
[1] 1.4049397 0.8447366 0.5590747

Rotation:
PC1         PC2        PC3
resmat.3...2. 0.5599782 -0.64434772 -0.5208075
resmat.3...3. 0.5229417  0.76245515 -0.3810434
resmat.3...4. 0.6426168 -0.05897597  0.7639146

Does anyone know why the other things are not appearing?

Thanks, Nick
	[[alternative HTML version deleted]]



More information about the R-help mailing list