Hi,
   
  How can I accomplish this in R.
   
  I have a Dataframe with 3 columns. Column B and C have same elements. But column A has more elements than B and C. I want to compare Column A with B and do the following:
   
  If A is not in B then insert a new row in B and C and fill these new rows with 
  B = A and C = 0. So finally I will have balanced dataframe with equal no of rows (entries) in all the columns. 
   
  For example:
   
  A[3] = 3 but is not in B. So insert new row  and set B[3]  = 3 (new row) and C[3] = 0. Final result would look like:
   
  A   B   C
  1    1    5
  2    2    3 
  3    3    0
  4    4   10
  5    5    0
  6    6    0
  7    7    12
  8    8    17
   
  These are the columns of DF
  > a <- c(1,2,3,4,5,6,7,8)
  > b <- c(1,2,4,7,8)
  > c(5,3,10,12,17)
   
  Thanx in advance for the help.
   
  Sachin

 __________________________________________________



	[[alternative HTML version deleted]]

