Multiple multiple linear regression <p>I have 40 SNPs and want to see the effect each individual SNP has on the age of menopause. To do this I need do a multiple linear regression each of the individual SNPs. I want to avoid typing the same command 40 different times (as in the future I'll be doing this with even more SNPs).</p> <p>What I want to do is make a list of the SNPs in a <code>csv</code> file and call this <code>x</code>:</p> <pre><code>x &lt;- read.csv("snps.csv") </code></pre> <p>Then I want to use this list in this command;</p> <pre><code>fit &lt;- lm(a_menopause ~ "snps" + country, data=mydata) </code></pre> <p>Where <code>snps</code> is my list of the SNPs I need to analyse, but needs to be done one SNP at a time. I'd ideally like to print the results to a <code>csv</code> file.</p>