Displaying 2 results from an estimated 2 matches for "sceond".
2010 Jun 29
3
How to delete the replicate rows by summing up the numeric columns
...rst,second,third)
## You may understand values in the first column are the unique codes for
those in the second column.
####So 'u' is only for usa. Replicate values appear the same rows for the
first and second columns.
### Now I want to delete replicate rows with the same values in first
(sceond) rows
####and sum up values in the third column for the same values.
mm=melt(data,id='first')
sum=cast(mm,first~variable,sum) ### This does not work.
###I tried another way to do this
mm= melt(data, id='first',measure='third')
sum=cast(mm,first~variable,sum)
## But then t...
2010 Jun 29
2
How to delete rows based on replicate values in one column with some extra calcuation
...rst,second,third)
## You may understand values in the first column are the unique codes for
those in the second column.
####So 'u' is only for usa. Replicate values appear the same rows for the
first and second columns.
### Now I want to delete replicate rows with the same values in first
(sceond) rows
####and sum up values in the third column for the same values.
mm=melt(data,id='first')
sum=cast(mm,first~variable,sum)
### This does not work. ><
But the expected dataframe is like this:
1 u third 8
2 b third 2
3 e third 13
4 k th...