title: How to use conditional expression to select data?
body: <p>I have a table like this:</p>
  
  <pre><code>symbol  refseq          seqname start           stop            strand
  Susd4   NM_144796       chr1    184695027       184826500       +
  Ptpn14  NM_008976       chr1    191552147       191700574       +
  Cd34    NM_001111059    chr1    196765080       196787475       +
  Gm5698  NM_001166637    chr1    31034088        31055753        -
  Epha4   NM_007936       chr1    77363760        77511663        -
  Sp110   NM_175397       chr1    87473474        87495392        -
  Gbx2                    chr1    91824537        91827751        -
  Kif1a                   chr1    94914855        94998430        -
  Bcl2    NM_009741       chr1    108434770       108610879       -
  </code></pre>
  
  <p>And I want to extract data with the following conditions:</p>
  
  <p>1) lines that the values in "refseq" column are not missing</p>
  
  <p>2) for the values in the columns "<code>start</code>" and "<code>stop</code>", only keep one value for each line: if the value in the column "<code>strand</code>" is "<code>+</code>", take the value in "<code>start</code>"; if the value in the column "<code>strand</code>" is "<code>-</code>", take the value in "<code>stop</code>".</p>
  
  <p>And this is what expected:</p>
  
  <pre><code>Susd4   NM_144796   chr1    184695027   +
  Ptpn14  NM_008976   chr1    191552147       +
  Cd34    NM_001111059    chr1    196765080       +
  Gm5698  NM_001166637    chr1        31055753    -
  Epha4   NM_007936   chr1        77511663    -
  Sp110   NM_175397   chr1        87495392    -
  Bcl2    NM_009741   chr1        108610879   -
  </code></pre>