I have a practical visual problem.  I would like to mirror the results of the PCA. In other words, everything that is on the left should go to the right and vice-versa. In my current graph, PCA 1 (see image attached) ranges from more use of inputs (left side) to more ecological management (right side). Visually I just want to mirror the results, so everything that in on the right goes to the left and vice versa. So then, PC1 would range from more ecological management (left side) to more use of inputs (right side). It is basically turning the graph upside down, but I want a function that does that for me! Any thoughts?   I know this issue has already been theoretically covered in other topics. What I need (and can`t find somewhere else) is how to change the visual output in R?
I performed principal component analysis (PCA) with R using two different functions (prcomp and princomp) and observed that the PCA scores differed in sign. How can it be?  Consider this:  set.seed(999) prcomp(data.frame(1:10,rnorm(10)))$x              PC1        PC2  [1,] -4.508620 -0.2567655  [2,] -3.373772 -1.1369417  [3,] -2.679669  1.0903445  [4,] -1.615837  0.7108631  [5,] -0.548879  0.3093389  [6,]  0.481756  0.1639112  [7,]  1.656178 -0.9952875  [8,]  2.560345 -0.2490548  [9,]  3.508442  0.1874520 [10,]  4.520055  0.1761397  set.seed(999) princomp(data.frame(1:10,rnorm(10)))$scores          Comp.1     Comp.2  [1,]  4.508620  0.2567655  [2,]  3.373772  1.1369417  [3,]  2.679669 -1.0903445  [4,]  1.615837 -0.7108631  [5,]  0.548879 -0.3093389  [6,] -0.481756 -0.1639112  [7,] -1.656178  0.9952875  [8,] -2.560345  0.2490548  [9,] -3.508442 -0.1874520 [10,] -4.520055 -0.1761397   Why do the signs (+/-) differ for the two analyses? If I was then using principal components PC1 and PC2 as predictors in a regression, i.e. lm(y ~ PC1 + PC2), this would completely change my understanding of the effect of the two variables on y depending on which method I used! How could I then say that PC1 has e.g. a positive effect on y and PC2 has e.g. a negative effect on y?    In addition: If the sign of PCA components is meaningless, is this true for factor analysis (FA) as well? Is it acceptable to flip (reverse) the sign of individual PCA/FA component scores (or of loadings, as a column of loading matrix)?
I keep reading about  ('PPAs') and people answer questions with a link to a PPA. What's the best way to use these?     There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience, an index of each is below. Energy-momentum tensor transformation I've been trying to find how the energy-momentum tensor changes if we add a total derivative to the lagrangian: $$L\to L+\mathrm d_\mu X^\mu.\tag{1}$$   From the answer key:  $$T^{\mu\nu}\to T^{\mu\nu}+\partial_\lambda F^{\lambda\mu\nu}\tag{2}$$ Where $$F^{\lambda\mu\nu}=\frac{\partial X^\lambda}{\partial(\partial_\mu\phi)}\partial^\nu\phi -\frac{\partial X^\mu}{\partial(\partial_\lambda\phi)}\partial^\nu\phi.\tag{3}$$ Is the above answer right? I'm not able to get this result! any help? Do shots fired before the match starts count towards your end-of-game statistics? In Overwatch, there is short countdown for a few minutes before the match begins. During this time, the defending team is allowed to roam the map to set up their defenses, while the attacking team sits in a small lobby until the game starts and the doors open. (Or in KotH-type maps, both teams wait in a lobby.)  While players wait, it's not uncommon for them to fire off random shots, especially since a lot of the environment is destructable (it's entertaining to watch plush onions sail through the air in the arcade).   Do shots fired before the match starts count towards accuracy statistics at the end of the game? Lock time not involved in MySQL slow query selection? I wish to analyze some read-write contentions problems on a very huge table where writes are very fast, less than 1ms in most case. The point is that the contention makes those write queries sometimes wait for the lock for a long time, i.e. hundreds of milliseconds. But the query itself remains very fast so it's not selected as a "slow query", which threshold is actually 10ms.  The only way to gather the information I need is to put à 0ms threshold so I can capture all queries, but it's not sustainable for more than 10mn on our production environment, where it would produce about 200MB of logs per minute.  In fact I can't understand why MySQL don't include the lock time, added to the execution time, for the slow query log selection process. At least, I wish there were an option for that.  Am I missing something ? why normalize and the definition of directional derivative I am trying to set up a wordpress multisite with MAMP Pro that will allow me to have two different domains (one domain for each language): dev.domainenglish.com dev.domainfrench.com I have already set up the primary english virtual host and secondary virtual french host. I have installed the wordpress multi site on the primary English virtual host. Next I created a &quot;sub site&quot; within the primary english domain multi site that has the location  dev.domainenglish.com/french/ Then I tried to use the MU Domain mapping plugin to make it so that when you visit dev.domainfrench.com the theme and content posted on dev.domainenglish.com/french/ will be visible. As of now when you visit dev.domainfrench.com the page loads the standard MAMP Pro index.html instead of my wordpress subsite:  the virtual host was set up successfully. If you can see this page, your new virtual host was set up successfully. Now, &gt;web contents can be added and this placeholder page1 should be replaced or &gt;deleted.&quot;  I understand that this plugin was built for live sites. But is there anyway I can achieve my goal of having two domains under one Wordpress multisite on my localhost? Thank you for your time! Given a Java InputStream, how can I determine the current offset in the stream? I'd like something like a generic, re-usable getPosition() method that will tell me the number of bytes read from the starting point of the stream.  Ideally, I would prefer this to work with all InputStreams, so that I don't have to wrap each and every one of them as I get them from disparate sources.  Does such a beast exist?  If not, can anyone recommend an existing implementation of a counting InputStream? Is there an elegant way to have performant, natural sorting in a MySQL database?  For example if I have this data set:   Final Fantasy Final Fantasy 4 Final Fantasy 10 Final Fantasy 12 Final Fantasy 12: Chains of Promathia Final Fantasy Adventure Final Fantasy Origins Final Fantasy Tactics   Any other elegant solution than to split up the games' names into their components    Title: "Final Fantasy" Number: "12" Subtitle: "Chains of Promathia"   to make sure that they come out in the right order? (10 after 4, not before 2).  Doing so is a pain in the a** because every now and then there's another game that breaks that mechanism of parsing the game title (e.g. "Warhammer 40,000", "James Bond 007") When upgrading to Ubuntu 14.04 from Ubuntu 12.04 I am getting the following error:     W:Failed to fetch    Unable to find expected entry 'non-free/source/Sources' in Release   file (Wrong sources.list entry or malformed file) , E:Some index files   failed to download. They have been ignored, or old ones used instead. SQL MAX of multiple columns? How do you return 1 value per row of the max of several columns:  TableName  [Number, Date1, Date2, Date3, Cost]   I need to return something like this:  [Number, Most_Recent_Date, Cost]   Query? Why is Linux reporting "free" memory strangely? The volume of a cone with height $h$ and radius $r$ is $\frac{1}{3} \pi r^2 h$, which is exactly one third the volume of the smallest cylinder that it fits inside.  This can be proved easily by considering a cone as a , but I would like to know if it can be proved or at least visual demonstrated without using calculus. A basic grammar rule is to use an instead of a before a vowel sound. Given that historic is not pronounced with a silent h, I use “a historic”. Is this correct? What about heroic? Should be “It was a heroic act” or “It was an heroic act”?  I remember reading somewhere that the h is sometimes silent, in which case it’s an, and when the h is pronounced, it’s a. But then I also remember reading that it depends on which syllable is stressed. And I also think I read somewhere that it might differ between British and American English.  Personally, I pronounce the h, and believe that a is correct. I find that it sounds incorrect to use an and pronounce heroic without the h.  So how do I know when to use a and when to use an with a word beginning with the letter h? Are both acceptable or is there one that is correct? Starting services in batch file on windows 7 Can QGIS open KMZ files? I know I can add KML files once I have unzipped the KMZ files, but is there a way to open KMZ files directly?   When I try to open a kmz file on QGIS 1.8.0 on Windows XP, through the all files filter, it does not accept it as a valid format.   Am I doing something wrong?   Does this all depend on OGR support? Updates for a private plugin? If I write a private plugin, is there any way to use the WordPress auto-update mechanism to update it?  I want to encapsulate the functionality, but it's specific to my own 5 or so blogs, so it's not a good candidate for the public plugins resource. But I love the easy-updating mechanism.  Is there a way to do this? Capturing console output from a .NET application (C#) How do I invoke a console application from my .NET application and capture all the output generated in the console?   (Remember, I don't want to save the information first in a file and then relist as I would love to receive it as live.) How do I change the icon for a particular file type? I'm trying to change the icon for application/x-hwp files. I've added the icons to the proper places, and checked it with assoGiate (after reading ). It shows that my desired icon is associated with the file type. Nevertheless, Nautilus is still showing the old icon. How can I make Nautilus show the correct icon? This is probably a silly question, but how can I run ANOVA using only the mean, standard deviation, and the sample size?  i.e.  Group  mean    sd    n  1:    200      5    5    2:    100     22    5  3:    150     14    5   I am using Statsoft Statistica software.  I know how to run it using the spreadsheet with all the data, but I have never done this using only the information listed above.  Any information would be greatly appreciated. System calls supported in running Kernel Is there a way to get the number of or list of system calls supported by currently running Linux Kernel? So I want to find a way to 'read' the syscall table of a running kernel.