title: Adding a new column in a matrix in R
body: <p>I have a matrix with 1 column:</p>
  
  <pre><code>&gt; Control_Title_name
  
  vehicle_scan_id4
  153 "CL2004060801AA"
  155 "CL2004060801AA"
  232 "EC2004102602AA"
  </code></pre>
  
  <p>I want to add a new column (named "Class") like below:</p>
  
  <pre><code>&gt; Control_Title_name
  
  vehicle_scan_id4 Class
          153 "CL2004060801AA" "Control"
          155 "CL2004060801AA" "Control"
          232 "EC2004102602AA" "Control"
  </code></pre>
  
  <p>The length of first column ("vehicle_scan_id4") is variable so I want the "Control" appear in each row as a value in second column ("Class").</p>
  
  <hr>
  
  <pre><code>&gt; Phenodata
      Name                 FileName             Target     
  153 "EC2004060203AA.CEL" "EC2004060203AA.CEL" "Treatment"
  155 "EC2004060205AA.CEL" "EC2004060205AA.CEL" "Treatment"
  232 "EC2004102606AA.CEL" "EC2004102606AA.CEL" "Treatment"
  153 "CL2004060801AA.CEL" "CL2004060801AA.CEL" "Control"  
  155 "CL2004060801AA.CEL" "CL2004060801AA.CEL" "Control"  
  232 "EC2004102602AA.CEL" "EC2004102602AA.CEL" "Control"
  </code></pre>
  
  <p>This is how my final matrix is looks like. Is there a way that I can filter only the unique rows based on their values not on <code>row.names</code>. For example, 4th and 5th rows contains exactly the same values. Is it possible that my new matrix only contain one of them, not both. </p>