title: Determining P values after using cor function to test significance in R
body: <p>I am new to R and am using the cor function (and specifically Spearman) to determine if there is a significant correlation between the passage of time (indicated in column 1) and the increase in frequencies of variables in the other 100,001 columns in my dataframe. In otherwords, I am testing to see if there is a correlation between column 1 and column 2-100,001 in turn.</p>
  
  <p>So, currently, I import a CSV file into R, and it is transformed into a dataset (test_data_fix).
  Currently, I use the following code, and it returns a dataframe with all my column labels alongside all of the the associated Spearman correlation values:</p>
  
  <p><code>x &lt;- test_data_fix[1:100001]
   y &lt;- test_data_fix[1]
   corrs_test &lt;- round(cor(x, y, method = "spearman", use="complete.obs"), 3)</code></p>
  
  <p>However, I am trying to also find the P values and have these as one of the columns in my returned dataframe. I know that if I use cor.test I can check the p-values for individual correlations one at a time or using corr.test returns the values for every single possible correlation. However, is there a way that I can just return the p-values for the test of correlation between just column 1 and all subsequent columns.</p>