R/removeDuplicateswithNA.r

Defines functions removeDuplicateswithNA

removeDuplicateswithNA = function(x,cols = c('trip','set'),idvar='dt'){
	 f = do.call(rbind,lapply(split(x,x[,cols]), function(rms) rms[which(!is.na(rms[,idvar])),]))
	 return(f)
}
jae0/snowcrab documentation built on Nov. 6, 2024, 10:13 p.m.