User Tools

Site Tools


how_to_change_data.frame_into_another_data.frame_which_is_unique_about_some_id

This is an old revision of the document!


a <- data.frame(col1 = sample(1:6,10,replace=T), col2 = sample(1:6, 10, replace = T))
a[!duplicated(a$col2),]
 
> duplicates
   col1 col2
1     5    3
2     6    1
3     3    1
4     1    4
5     2    1
6     3    5
7     6    5
8     2    4
9     6    1
10    4    5
 
> a[!duplicated(a$col2),]
  col1 col2
1    1    4
2    2    1
4    6    5
6    5    6
how_to_change_data.frame_into_another_data.frame_which_is_unique_about_some_id.1438473473.txt.gz · Last modified: 2015/08/02 01:57 by vincenzo