title: Selecting rows in data.frame based on character strings
body: <p>I've a <code>data.frame</code> with <code>row.names</code> as in test.</p>
  
  <pre><code>test &lt;-
  c("Env_1990:trait_KPS", "Env_1990:trait_SPSM", "Env_1990:trait_TKW",
  "Env_1990:trait_Yield", "Env_1991:trait_KPS", "Env_1991:trait_SPSM",
  "Env_1991:trait_TKW", "Env_1991:trait_Yield", "Env_1992:trait_KPS",
  "Env_1992:trait_SPSM", "Env_1992:trait_TKW", "Env_1992:trait_Yield",
  "Env_1993:trait_KPS", "Env_1993:trait_SPSM", "Env_1993:trait_TKW",
  "Env_1993:trait_Yield", "Env_1994:trait_KPS", "Env_1994:trait_SPSM",
  "Env_1994:trait_TKW", "Env_1994:trait_Yield", "Env_1995:trait_KPS",
  "Env_1995:trait_SPSM", "Env_1995:trait_TKW", "Env_1995:trait_Yield",
  "Gen_B88:Env_1990:trait_KPS", "Gen_B88:Env_1990:trait_SPSM",
  "Gen_B88:Env_1990:trait_TKW", "Gen_B88:Env_1990:trait_Yield",
  "Gen_B88:Env_1991:trait_KPS", "Gen_B88:Env_1991:trait_SPSM",
  "Gen_B88:Env_1991:trait_TKW", "Gen_B88:Env_1991:trait_Yield",
  "Gen_B88:Env_1992:trait_KPS", "Gen_B88:Env_1992:trait_SPSM",
  "Gen_B88:Env_1992:trait_TKW", "Gen_B88:Env_1992:trait_Yield",
  "Gen_B88:Env_1993:trait_KPS", "Gen_B88:Env_1993:trait_SPSM",
  "Gen_B88:Env_1993:trait_TKW", "Gen_B88:Env_1993:trait_Yield")
  </code></pre>
  
  <p>I want to select only those rows which start with <code>Env_</code>. I tried this code in <code>R</code></p>
  
  <pre><code>grep(pattern="[Env_]", x=test).
  </code></pre>
  
  <p>This code gives me all rows because <code>Env_</code> appears in every row name. I wonder how to select rows which starts only with <code>Env_</code>. Thanks in advance for your help.</p>