Re: [問題] 找出重複的資料組

作者: helixc (@_2;)   2015-07-03 09:18:19
抱歉講的不夠詳細...
假設我已經把birdtrip整合進來了,資料長這樣:
>bird
date bird_id bird_name num place reporter birdtrip
1 2001-01-01 201 sp1 3 金門 John T0001
2 2001-01-01 202 sp2 2 金門 John T0001
3 2001-01-01 205 sp3 8 金門 John T0001
4 2001-01-01 3507 sp4 10 金門 John T0001
5 2001-01-01 4104 sp5 1 金門 John T0001
6 2001-01-01 4105 sp6 1 金門 John T0001
7 2011-11-05 4105 sp6 2 馬祖 Mary T0002
8 2011-11-05 1003 sp7 5 馬祖 Mary T0002
9 2013-05-21 999 sp8 10 綠島 Terry T0003
10 2013-05-21 831 sp9 11 綠島 Terry T0003
..
51 2001-01-01 201 sp1 3 金門 John T0001
52 2001-01-01 202 sp2 2 金門 John T0001
53 2001-01-01 205 sp3 8 金門 John T0001
54 2001-01-01 3507 sp4 10 金門 John T0001
55 2001-01-01 4104 sp5 1 金門 John T0001
56 2001-01-01 4105 sp6 1 金門 John T0001
bird[1:6,]和bird[51:66,]的資料是一模一樣的,要怎麼抓出這種重複資料呢?
作者: celestialgod (天)   2015-07-03 10:09:00
distinct(bird)就好, 你之前不該加變數的, 還有上一篇的推文方法都適用
作者: helixc (@_2;)   2015-07-03 10:40:00
瞭解,看來是我想太多了...

Links booklink

Contact Us: admin [ a t ] ucptt.com