title: Get unique values for string in R using dplyr
body: <p>I am summarising a table in R using the package dplyr. I'd like to see unique values only for a column in my table (Services.Offered). However, when I try the following code, I don't get unique values in this column-</p>
  
  <pre><code>sheetforr1=sheetforr %&gt;%
                group_by(Account.Name, Service.managed.by.country) %&gt;% 
                summarise(Services.Offered = unique(toString(Service.Level.2)),
                           POB = toString(Number.of.Users),
                           Start.Dates = toString(Provider.Start.Date),
                           End.Dates = toString(Provider.End.Date)) %&gt;% 
                ungroup()
  </code></pre>
  
  <p>The result for the column 'Services.Offered' contains duplicates despite using 'unique' (for example: Cleaning, Gardening, Maintenance, Cleaning, Housekeeping, Housekeeping). </p>
  
  <p>In addition, when I use 'distinct' instead of 'unique', I get an error message: </p>
  
  <blockquote>
    <p>no applicable method for 'distinct_' applied to an object of class "character"</p>
  </blockquote>
  
  <p>Continuing with the example I just used, what I'd like is for to column <code>Services.Offered</code> to show: (Cleaning, Gardening, Maintenance, Housekeeping).</p>
  
  <p>Thank you in advance for any help.</p>