title: R - Partial string matching subset
body: <p>I have a data frame called LeaseDF. I am looking to pull all observations where the Team_Code column is contains the letter "t". The simple code I have is below. Somehow is not returning anything. I have also tried for loops with the grepl function and lapply with grepl to no avail. Thanks. </p>
  
  <pre><code>subset &lt;- LeaseDF[grep("^t-", LeaseDF$TEAM_CODE),]
  </code></pre>