title: how to merge few columns into single column within semicolon delimiter inside of the new column in r
body: <p>I want to merge few columns and create a column contains list (or like dictionary in python) which are separated by semicolon.<br />
  Basically, I have this dataframe: (empty spaces are missing values)</p>
  <pre><code>ID  Event Category  Start Time  End Time    Account No.   Dosage  Doctor's_ID
  1    Stroke          1/1/2011       
  1   Admitted         1/6/2011               24287939                  5487
  1   Diagnosed        1/25/2011      
  6   Diagnosed        1/1/2011       
  6   Drug       A     1/2/2011   1/10/2011                  &quot;high&quot;
  6   Drug       B     1/7/2011   1/20/2011   35287930      &quot;medium&quot;
  10  Drug       A    1/3/2011    1/6/2011                   &quot;low&quot;
  10  Drug       B    1/9/2011    1/13/2011                  &quot;high&quot;
  10  Stroke          1/8/2011        
  </code></pre>
  <p>I want to create a column <code>attribute</code> which merge few columns in a column and within semicolon delimiter.</p>
  <p>output file (can be text file) looks:</p>
  <pre><code>  ID    Event Category  Start Time  End Time    attributes
      1    Stroke          1/1/2011       
      1   Admitted         1/6/2011               Account No.=&quot;24287939&quot;; Doctor's_ID=&quot;5487&quot;
      1   Diagnosed        1/25/2011      
      6   Diagnosed        1/1/2011       
      6   Drug       A     1/2/2011   1/10/2011   Dosage=&quot;high&quot;
      6   Drug       B     1/7/2011   1/20/2011   Account No.=&quot;35287930&quot;; Dosage=&quot;medium&quot;
      10  Drug       A    1/3/2011    1/6/2011    Dosage=&quot;low&quot;
      10  Drug       B    1/9/2011    1/13/2011   Dosage=&quot;high&quot;
      10  Stroke          1/8/2011        
  </code></pre>
  <p>my purpose is to write a text file which the columns are separated by tab delimiter (&quot;\t&quot;) and attribute data (the last column) which is like a list  separated by &quot;;&quot;.</p>
  <p>more detail about desired output provided here <a href="http://www.cs.umd.edu/hcil/eventflow/manual/chapter_start.html#1.4" rel="nofollow noreferrer">http://www.cs.umd.edu/hcil/eventflow/manual/chapter_start.html#1.4</a></p>
  <p>how can I do it in R?thx</p>