title: extracting a subset of a string
body: <p>The column names in my data frame contain names similar to "S156 B1-1 U500 (HTA-1 0).SST RMA gene.sst-rma-gene-full-Signal". I want to remove all after parenthesis ( including parenthesis).</p>
  
  <p>I have seen <a href="https://stackoverflow.com/questions/17215789/extract-a-substring-in-r-according-to-a-pattern/42315852#42315852">extract a substring in R according to a pattern</a> and <a href="https://stackoverflow.com/questions/29973403/getting-a-sub-string-from-a-vector-of-strings?noredirect=1&amp;lq=1">Getting a sub string from a vector of strings</a> topics but still wondering.</p>
  
  <p>I have tried <code>sub('(HTA-1 0).*','', colnames(data))</code> but the output is like S156 B1-1 U500 (.
  How should I remove the parenthesis? 
  Thanks</p>