comparison check_unique_id.r @ 57:cb779a45537b draft

Uploaded
author davidvanzessen
date Tue, 18 Jul 2017 04:28:11 -0400
parents ee807645b224
children
comparison
equal deleted inserted replaced
56:ee807645b224 57:cb779a45537b
6 6
7 if(!("Sequence number" %in% names(current))){ 7 if(!("Sequence number" %in% names(current))){
8 stop("First argument doesn't contain the 'Sequence number' column") 8 stop("First argument doesn't contain the 'Sequence number' column")
9 } 9 }
10 10
11 tbl = table(current$Sequence.ID) 11 tbl = table(current[,"Sequence ID"])
12 l_tbl = length(tbl) 12 l_tbl = length(tbl)
13 check = any(tbl > 1) 13 check = any(tbl > 1)
14 14
15 #if(l_tbl != nrow(current)){ # non unique IDs? 15 #if(l_tbl != nrow(current)){ # non unique IDs?
16 if(check){ 16 if(check){