この質問は、Stata: select the minimum of each observationに関連しています。 次のように私はデータを持っている: clear
input str4 id int eventdate byte dia_bp_copy int sys_bp_copy
"pat" 15698 100 140
"pat" 16183 80 120
"pat" 19226
私は観察のより多くの時間があるかもしれないすべての日付について datecolumn hourcolumn daycolumn V h m dir_0 dir_15 dir_30 dir_45
1: 2014.01.02 08:00 4 83 8 0 1 NA NA NA
2: 2014.01.02 08:15 4 72 8 15 NA -1 NA
現在、Rager APIを介してPagerDutyからインシデントのリストを取得しようとしています。which returns them in JSON array。私は、incident_keyでunique_by()を使用して重複イベントを削除したいと思います。しかし、私はincident_keyの最初の出現が欲しいですし、unique_by()は最後の出現を除くすべてを取り除いています。 [