作者helixc (@_2;)
看板R_Language
標題Re: [問題] 找出重複的資料組
時間Fri Jul 3 09:18:19 2015
抱歉講的不夠詳細...
假設我已經把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,]的資料是一模一樣的,要怎麼抓出這種重複資料呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.130.96.14
※ 文章網址: https://webptt.com/m.aspx?n=bbs/R_Language/M.1435886301.A.C1E.html
1F:推 celestialgod: distinct(bird)就好, 你之前不該加變數的, 還有上 07/03 10:09
2F:推 celestialgod: 一篇的推文方法都適用 07/03 10:09
3F:→ helixc: 瞭解,看來是我想太多了... 07/03 10:40