title: Finding non-linear correlations in R
body: <p>I have about 90 variables stored in data[2-90]. I suspect about 4 of them will have a parabola-like correlation with data[1]. I want to identify which ones have the correlation. Is there an easy and quick way to do this? </p>
  
  <p>I have tried building a model like this (which I could do in a loop for each variable i = 2:90): </p>
  
  <pre><code>y &lt;- data$AvgRating
  x &lt;- data$Hamming.distance
  x2 &lt;- x^2
  
  quadratic.model = lm(y ~ x + x2)
  </code></pre>
  
  <p>And then look at the R^2/coefficient to get an idea of the correlation. Is there a better way of doing this? </p>
  
  <p>Maybe R could build a regression model with the 90 variables and chose the ones which are significant itself? Would that be in any way possible? I can do this in JMP for linear regression, but I'm not sure I could do non-linear regression with R for all the variables at ones. Therefore I was manually trying to see if I could see which ones are correlated in advance. It would be helpful if there was a function to use for that. </p>