My data looks like this:  Color | X_1 X_2 ... X_n ----------------------- red   | 0.5 0.9 ... 0.2 green | 0.7 0.7 ... 0.3 red   | 0.8 0.3 ... 0.2 blue  | 0.7 0.4 ... 0.2 ...   I want to test for a correlation between the categorical variable Color and each interval variable X_i. What is the best way to calculate this (in R)?  For the sake of full disclosure, I'm trying to generate a simulation showing how easy it is to find spurious correlations when you have a small number of data points with a large number of features.
Is there any adjustment required when computing the correlation coefficient between:   continuous and discrete variable  two discrete variables ?    Thanks !
Preserving order with LINQ I use LINQ to Objects instructions on an ordered array.  Which operations shouldn't I do to be sure the order of the array is not changed? I have a site which is running under SharePoint 2013. Via REST I am trying to retrieve the file and folder directory for that site. There are several similar questions on this site related to recursively retrieving all of the files and folders for a given a folder:       The answers provided therein led me to the following URI:     /_api/web/Lists/GetByTitle('Documents')/Items?$expand=Folder&amp;$select=Title,FileLeafRef,Folder/ServerRelativeUrl   Which from what I can tell does retrieve all of the files and folders from the given starting path.  However, I am missing something. When reading through the returned XML I cannot figure out where a given file goes. Meaning that I have info on how to retrieve file bros.pdf, but cannot determine that it is in the documents/super/mario/ folder.  For the file items I've tried to retrieve the ServerRelativeUrl property, but have not succeeded though the folders seem to. Is there some identifier in the XML that I am missing? When doing a recursive RESTful query how do I determine where a given file belongs? jQuery call function from a string Do you pluralize the singular possessions of / items or people associated with individual members of a plural group? Suppose that an entire function $f(z)$ satisfies $\left|f(z)\right|\leq k\left|z\right|^n$ for sufficiently large $\left|z\right|$, where $n\in\mathbb{Z^+}$ and $k&gt;0$ is constant. Show that $f$ is a polynomial of degree at most $n$. How do I avoid the "S to Skip" message on boot? After upgrading my laptop from karmic to lucid, my fat32 partition won't mount automatically. I get the message:  The disk drive for /osshare is not ready yet or not present Continue to wait; or Press S to skip mounting or M for manual recovery   Funny thing is, if I skip, then /osshare/ is mounted once I log in.   I've a similar setup on my desktop, and it works fine. Fstab on desktop:  UUID=4663-6853  /osshare        vfat    utf8,umask=007,gid=46 0       1   /etc/fstab on laptop:  UUID=1234-5678 /osshare vfat utf8,auto,rw,user 0 0 Plotting heat equation in a Manipulate expression "Me and my wife" or "my wife and me" My 3 years old doesn't tell me when he needs to use the bathroom Why do bridge non-Captain officers commonly go on away missions? Ever since the days of Kirk, Spock, and McCoy, bridge officers in Starfleet have always had a prominent role in away team missions.  However, it would seem more logical to me that such hazardous (and, generally, specialized) duties should fall to lower-ranking and/or more dedicated teams.  Of course, it wouldn't have made for great TV if every away team was comprised of a bunch of red-shirts.  And it would definitely increase the show's budget to have an extra group of main characters whose sole purpose was to handle the away missions.  Still, I'm curious to know if there's ever been a real in-universe explanation for this practice?  I know it's been brought up a few times, in a few series/movies, that the Captain should not be taking part in hazardous away team missions.  But nothing is ever said (that I'm aware of) of the rest of the still valuable bridge crew or other senior officers. How did the AT-ATs get to the surface of Hoth? I'm curious how these beasts got down to the surface of Hoth.    Did the Galactic Empire land them in big ships, if so which ones? When I use any variation of English, US international (with dead keys,altGr dead keys or alternative) on my Linux Mint machine I always encounter this behaviour. When I press one of these keys: ' " and then follow them with a 'non-accentable' character like a [ or a b no output comes out at all.    Whereas in Windows US-International it would print [ or b. If I wanted to type this I would have to escape each dead key with a space instead of with any 'non-accentable' character. This is annoying when programming (not really, but I trained with the Windows 'Qwerty International' on typing.io and switching back and forth between the systems is irritating).    Is there any way to change that so it works like in Windows? I have multiple Amazon EC2 accounts and want to quickly be able to switch variables, such as $EC2_HOME, using a script.  I have have a shell script set up like this:  #!/bin/sh export EC2_HOME=/home/me/.ec2 echo $EC2_HOME   When I run the script I know that EC2_HOME is set, but I thought that using export would make the variable stick around after the script completed. It does not, as running echo $EC_HOME does not show anything.  I know this must be very rudimentary Linux scripting knowledge, but I don't know it. I tried looking for related questions without luck - so my apologies if this is a duplicate. What is the best way to give a C# auto-property an initial value? In Episode 1: The Phantom Menace, Anakin's mother, Shmi, said that he does not have a father, although it seemed to me that she doubted that.  Is there a canonical answer as to who Anakin's father is?  If so, who? Spoiler warning!  During the first escape attempt in Portal 2 (when GLaDOS is still in charge) she opens a door for you which you can choose to go through instead of following Wheatley (the blue-eyed ball). What happens if you go there? How to add PlotLegends in a Show function? I'm from Tunisia and I got a Schengen visa from the Austrian Embassy for  28 days, the “duration of stay”, and the number of entries is 1. But the validity of the visa is from 02/08/2015 to 13/09/2015.  Do I have to stay only 28 days, for example from 02/08/2015 to 29/08/2015 or can I stay there until 12/09/2015 ?  And if I have got to stay only 28 days, then can I choose the days of stay, that's mean can I stay in Austria for example from 09/08/2015 to 05/09/2015? Finding a 2x2 Matrix raised to the power of 1000 Let $A= \pmatrix{1&amp;4\\ 3&amp;2}$. Find $A^{1000}$.  Does this problem have to do with eigenvalues or is there another formula that is specific to 2x2 matrices? A line is drawn through the point $A(1,2)$ to cut the line $2y=3x-5$ in $P$ and the line $x+y=12$ in $Q$. If $AQ=2AP$, find the coordinates of $P$ and $Q$.  I found the lengths of the lines $AQ$ and $AP$ in terms of $x$ and $y$ and used $AQ=2AP$ to get this equation $11x^2-40x-16=0$  Working: $AP=\sqrt{(x-1)^2+(\frac{3}{2}x-\frac{9}{2})^2}=\sqrt{\frac{1}{4}(13x^2-62x+85)}$  $AQ=\sqrt{(x-1)^2+(-x+10)^2}=\sqrt{2x^2-22x+101}$  $AQ=2AP\Rightarrow \sqrt{2x^2-22x+101}=2\sqrt{\frac{1}{4}(13x^2-62x+85)}$  $\Rightarrow 2x^2-22x+101=13x^2-62x+85\Rightarrow 11x^2-40x-16=0$  Using the quadratic formula I found $x=4,x=-\frac{4}{11}$  I then substituted these values into the two equations in the question to get the coordinates $(4,\frac{7}{2}),(-\frac{4}{11},-\frac{15}{11})$ or $(4,8),(-\frac{4}{11},\frac{136}{11})$  But the answers in the book are $(4,\frac{7}{2}),(7,5)$ or $(\frac{2}{5},-\frac{19}{10}),(\frac{11}{5},\frac{49}{5})$  I don't know where I went wrong in my method.  Edit: Found some errors in my method and calculation.  Using $x=4$ in $2y=3x-5$ gives $P(4,\frac{7}{2})$  Line with points $AP$ has equation $y-2=\frac{\frac{7}{2}-2}{3}(x-1)\Rightarrow y=\frac{1}{2}x+\frac{3}{2}$  $Q$ lies on the same line. Therefore, the intersection between $y=\frac{1}{2}x+\frac{3}{2}$ and $y+x=12$ is the point $Q$. Working: $\frac{1}{2}x+\frac{3}{2}=-x+12\Rightarrow x=7$ Therefore, $y=-7+12=5$. Point Q has coordinates $(7,5)$.  But $x=-\frac{4}{11}$ is not the other $x$ coordinate of $P$ according to the answers in the book. I have no idea where I went wrong at this point.