I am working on a simple dataset which is best analysed with t-tests, but there are at least 2 dozen t-tests, which creates a lot of lines of code and many tables! I was wondering if the there is a way to have one line of code that has all the y-variables, as my grouping variables remain the same, and then they show up in one table. Thank you for your help. Also, if there is a simple way to export the results to word or R in table format, please let me know. I'd appreciate it.
Here is a sample of my code.
t.test(XC[tissue =="Ent"], XC[tissue =="Stom"])
t.test(XN[tissue =="Ent"], XN[tissue =="Stom"])
t.test(CN[tissue =="Ent"], CN[tissue =="Stom"])