[R] prcomp - arbitrary direction of the returned principal components

2022-10-12 Thread Ashim Kapoor
Dear R experts, >From ?prcomp, snip - Note: The signs of the columns of the rotation matrix are arbitrary, and so may differ between different programs for PCA, and even between different builds of R. snip -- My problem is that I am building an index based on Pr

Re: [R] prcomp - arbitrary direction of the returned principal components

2022-10-12 Thread Ebert,Timothy Aaron
Use absolute value Tim -Original Message- From: R-help On Behalf Of Ashim Kapoor Sent: Wednesday, October 12, 2022 7:48 AM To: R Help Subject: [R] prcomp - arbitrary direction of the returned principal components [External Email] Dear R experts, >From ?prcomp, snip - Note:

Re: [R] Reading Text files from UK Met Office into R again...

2022-10-12 Thread David Winsemius
First one needs to remove the extraneous line-ends that you created by using an editor that inserts those line-ends (or perhaps it was your mail-client that added them because you failed to post in plain-text. I removed those files "by hand" and then created a text "file". txt <- "2015-01-01 00

Re: [R] prcomp - arbitrary direction of the returned principal components

2022-10-12 Thread Ashim Kapoor
Dear Aaron, Many thanks for your reply. Please allow me to illustrate my query a bit. I take some data, throw it to prcomp and extract the x data frame from prcomp. >From ?prcomp: x: if ‘retx’ is true the value of the rotated data (the centred (and scaled if requested) data mu

Re: [R] prcomp - arbitrary direction of the returned principal components

2022-10-12 Thread Chris Evans
I agree with this and I'm not very sure why you feel you need the signs fixed one way: they are arbitrary and how they come out is generally a function of things in the handling of rounding as values hit the limit of the finite arithmetic in the particular program and OS and hardware on which it's