title: How to subset dataframe with a character vector
body: <p>I have a tibble of data which looks like:</p>
  
  <pre><code>Ticker Date.x               Rclose  Fclose Close Date.y              dumone yindex
     &lt;chr&gt;  &lt;dttm&gt;                &lt;dbl&gt;   &lt;dbl&gt; &lt;dbl&gt; &lt;dttm&gt;               &lt;dbl&gt;  &lt;dbl&gt;
   1 AAAU   2018-08-15 00:00:00 NA      NA       11.8 2018-08-15 00:00:00      1      1
   2 AAAU   2018-08-16 00:00:00  0.0166  0.0025  11.7 2018-08-15 00:00:00      1      2
   3 AAAU   2018-08-17 00:00:00  0.0166  0.0025  11.8 2018-08-15 00:00:00      1      3
   4 AAAU   2018-08-20 00:00:00  0.0166  0.0025  11.9 2018-08-15 00:00:00      1      4
   5 AAAU   2018-08-21 00:00:00 -0.0258  0.045   11.9 2018-08-15 00:00:00      1      5
   6 AAAU   2018-08-22 00:00:00 -0.0273  0.0464  12.0 2018-08-15 00:00:00      1      6
  </code></pre>
  
  <p>For each ticker symbol there is 30 days of data. I would like to find the ticker with a Fclose >.5 anywhere in the group. But I just want that specific day where Fclose>-.5 but all the records in the group where at least one of the records has a Fclose>.5. </p>
  
  <p>I am able to do the following with no problem:</p>
  
  <pre><code> bigRates&lt;-subset(newdata7,Fclose&gt;=.5)
   bigRates&lt;-unique(bigRates$Ticker)
  </code></pre>
  
  <p>newdata7 is the dataset. The final bigRates has the tickers where at least one of the days had fclose>.5 gives the tickers:</p>
  
  <pre><code>[1] "ADPT"  "ADRO"  "AIMT"  "ANAB"  "APRN"  "AQUA"  "ARD"   "ARLO"  "AVRO"  "BAND"  "BE"    "BEDU"  "BOX"   "BPMP"  "BTAI" 
   [16] 
  </code></pre>
  
  <p>Now the problem is to take bigRates and use it to subset the newdata7 file along the lines of ticker. Problem is bigRates has no ticker column name (and perhaps the wrong type?) so that it can be used to select data from newdata6</p>
  
  <p>I tried</p>
  
  <pre><code> result&lt;-subset(newdata7,Ticker==bigRates)
  </code></pre>
  
  <p>and got the error message:</p>
  
  <blockquote>
    <p>In Ticker == bigRates :   longer object length is not a multiple of
    shorter object length</p>
  </blockquote>
  
  <p>and I also tried </p>
  
  <pre><code> bigData &lt;-merge(bigRates,newdata7, by=c("Ticker"), all.x=TRUE)
  </code></pre>
  
  <p>and got the error message</p>
  
  <blockquote>
    <p>Error in fix.by(by.x, x) : 'by' must specify a uniquely valid column</p>
  </blockquote>
  
  <p>Note that bigRates has no column name (which it should for this to work, but when I do</p>
  
  <pre><code>colname(bigRates)&lt;-c("Ticker")
  </code></pre>
  
  <p>I get the error message</p>
  
  <blockquote>
    <p>Error in colname(bigRates) &lt;- c("Ticker") :    could not find function
    "colname&lt;-"</p>
  </blockquote>