<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">Last month I asked how to select some text and press a keyboard shortcut that would send the selected text to R app: <a href="http://lists.macromates.com/textmate/2014-March/037158.html">http://lists.macromates.com/textmate/2014-March/037158.html</a></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;"><br></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">This is working excellently well. I’m interested in extending this, but cannot figure out how to set it up.</div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;"><br></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">Lets say I have this code: </div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;"><br></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">summary(<span style="white-space: pre-wrap;">lm(mpg ~ drat  + hp, mtcars))</span></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;"><span style="white-space: pre-wrap;"><br></span></div><div><font face="Calibri,sans-serif"><span style="white-space: pre-wrap;">How can </span></font>select 'mtcars’ and ‘hp’ simultaneously, press a keyboard shortcut and run this code in R app:</div><div><br></div><div>mtcars$hp</div><div><br></div><div>Similarly, in this code:</div><div><br></div><div>ddply(mtcars, .(cyl), summarise, mean(mpg))</div><div><br></div><div><div><font face="Calibri,sans-serif"><span style="white-space: pre-wrap;">How can </span></font>select 'mtcars’ and ‘mpg’ simultaneously, press a keyboard shortcut and run this code in R app:</div></div><div><br></div><div>mtcars$mpg</div><div><br></div><div>Thanks</div><div>Ross</div><div><br></div></body></html>