title: How do I run a multiple linear regression using a vector as my predictors?
body: <p><strong>I'm hoping to do something like this:</strong></p>
  
  <pre><code>data = read.table("mydata.txt", header=T)[,-1]
  test&lt;-c("Piggies","Epstein","Majesty","Millionmiles","Mozambique","Deadpool","Blackbird","SamStonev2","Daytripper","Starr","Yellowsubmarine","Harrison","Taxman","Carey","Baez","Finn","Glassonionv2","Weight","Jericho","Monkey","Maggiemae","Cinnamongirl","Walrus","Anna","Handydandy","Pam","Wigwam","Psylocke","Coolwater","Wallflower","Cactustree","Hoist","Baronharkonnen","Coyote","BlueJay","NeilYoung","Harvest","KittyPryde","Beatles","Jam_session","Black_Crow","Carnival","Tombstone_blues","Sun_King","EmmaFrost","Sway","GhanimaAtreides","Heartland","Siona","Percy","Julia","Trouble","Sol_49","C21","Sol_18","i_126","i_114","Sol_6","Sinv_25","Sol_M3","Sol_20","Sol_42f","C316","C204","i_120_PigTail","C234","C368_PigTail","i_135","C1","C121_PigTail","C264","C367","Sinv12","C278_PT","i_125_PT","C485","Jerry_Garcia","C259","i_113","i_127","cassidy_PigTail","Sol_11","Jackstraw_PigTail","st_stephen","red_ant","sunrise","i_109","C216_pigtail","i129")
  fit1 &lt;- lm(data$QnWeight_initial_mg ~ data$test)
  </code></pre>
  
  <p><strong>Instead of having to do this:</strong></p>
  
  <pre><code>fit1 &lt;- lm(data$QnWeight_initial_mg ~ data$Piggies+data$Epstein+data$Majesty+data$Millionmiles+data$Mozambique+data$Deadpool+data$Blackbird+data$SamStonev2+data$Daytripper+data$Starr+data$Yellowsubmarine+data$Harrison+data$Taxman+data$Carey+data$Baez+data$Finn+data$Glassonionv2+data$Weight+data$Jericho+data$Monkey+data$Maggiemae+data$Cinnamongirl+data$Walrus+data$Anna+data$Handydandy+data$Pam+data$Wigwam+data$Psylocke+data$Coolwater+data$Wallflower+data$Cactustree+data$Hoist+data$Baronharkonnen+data$Coyote+data$BlueJay+data$NeilYoung+data$Harvest+data$KittyPryde+data$Beatles+data$Jam_session+data$Black_Crow+data$Carnival+data$Tombstone_blues+data$Sun_King+data$EmmaFrost+data$Sway+data$GhanimaAtreides+data$Heartland+data$Siona+data$Percy+data$Julia+data$Trouble+data$Sol_49+data$C21+data$Sol_18+data$i_126+data$i_114+data$Sol_6+data$Sinv_25+data$Sol_M3+data$Sol_20+data$Sol_42f+data$C316+data$C204+data$i_120_PigTail+data$C234+data$C368_PigTail+data$i_135+data$C1+data$C121_PigTail+data$C264+data$C367+data$Sinv12+data$C278_PT+data$i_125_PT+data$C485+data$Jerry_Garcia+data$C259+data$i_113+data$i_127+data$cassidy_PigTail+data$Sol_11+data$Jackstraw_PigTail+data$st_stephen+data$red_ant+data$sunrise+data$i_109+data$C216_pigtail+data$i129)
  </code></pre>
  
  <p>I hope that my question makes sense! Thanks so much, guys!</p>