title: Getting a vector of all unique numerical values in a data.frame
body: <p>I have data as follows:</p>
  <pre><code>dat &lt;- structure(list(rn = c(&quot;region&quot;, &quot;lower threshold&quot;, &quot;upper threshold&quot;
  ), east_0_25 = c(&quot;east&quot;, &quot;0&quot;, &quot;25&quot;), north_0_25 = c(&quot;north&quot;, 
  &quot;0&quot;, &quot;25&quot;)), row.names = c(NA, -3L), class = c(&quot;data.table&quot;, 
  &quot;data.frame&quot;))
  
                  rn east_0_25 north_0_25
  1:          region      east      north
  2: lower threshold         0          0
  3: upper threshold        25         25
  </code></pre>
  <p>I am wondering what the easiest way would be to create a vector of all unique numerical values out of this data.frame, <strong>noting that <code>0</code> and <code>25</code> are character values</strong>.</p>
  <p>I guess I could start with:</p>
  <pre><code>dat &lt;- lapply(dat, as.numeric)
  </code></pre>
  <p>To keep only the numerical values. But what should be the next step?</p>
  <p>Desired outcome:</p>
  <pre><code>unique_num_values &lt;- c(0,25)
  </code></pre>