title: Group by one column and see all unique results of another column of uneven lengths
body: <p>I want to create sort my dataframe by all unique sites and list all of the values in another column (without performing any function on those values). The values for each site will be of different lengths. I want to keep the values numerical so I can do some data manipulation afterwards (such as box plots among others).</p>
  
  <p>I'm able to use tidyverse and create a string of uneven characters.</p>
  
  <p>Sample data</p>
  
  <pre><code>a&lt;-data.frame(c(41.14542,41.14542,41.14542,41.14542,41.14542), 
  c(-74.1129,-74.1129,-74.1129,-74.1129,-74.1129), c(89,36,20,26,35))
  colnames(a)&lt;-c("LAT","LONG","value")
  b&lt;-data.frame(c(43.00309,43.00309,43.00309), 
  c(-75.02384,-75.02384,-75.02384), c(1,17,20))
  colnames(b)&lt;-c("LAT","LONG","value")
  c&lt;-data.frame(c(43.17203,43.17203), c(-77.52824,-77.52824), c(2,2))
  colnames(c)&lt;-c("LAT","LONG","value")
  samp_data&lt;-rbind(a,b,c)
  </code></pre>
  
  <p>Code I've tried</p>
  
  <pre><code>library(tidyverse)
  samp&lt;-samp_data %&gt;% group_by(LAT, LONG) %&gt;%  mutate(value_string = paste(value, collapse = ",")) %&gt;% select(LAT, LONG, value_string) %&gt;% unique()
  </code></pre>
  
  <p>This gives me this result:</p>
  
  <pre><code>    LAT  LONG value_string   
      &lt;dbl&gt; &lt;dbl&gt; &lt;chr&gt;        
  1  41.1 -74.1 89,36,20,26,35
  2  43.0 -75.0 1,17,20       
  3  43.2 -77.5 2,2    
  </code></pre>
  
  <p>*I don't know why it's rounding my LAT/LONG values.</p>
  
  <p>I need the third column to be numeric, not a string of characters. So something like this would work (note class of value_string):</p>
  
  <pre><code>    LAT  LONG value_string   
      &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;        
  1  41.1 -74.1 89,36,20,26,35
  2  43.0 -75.0 1,17,20       
  3  43.2 -77.5 2,2  
  </code></pre>
  
  <p>I've looked at aggregate (seems to require applying some function), playing with lists (having trouble with the uneven lengths for each site) but couldn't get them to work.</p>
  
  <p>Also, I don't want to aggregate, i.e. site (43.17203,-77.52824) needs to appear twice and not be treated/combined as one row. So this wouldn't be ideal:</p>
  
  <pre><code>    LAT  LONG value_string   
      &lt;dbl&gt; &lt;dbl&gt; &lt;chr&gt;        
  1  41.1 -74.1 89,36,20,26,35
  2  43.0 -75.0 1,17,20       
  3  43.2 -77.5 2 
  </code></pre>
  
  <p>(row 3 with only one value instead of two values).    </p>
  
  <p>Thank you in advance!</p>