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 Feb. 27, 2024, 2:42 p.m.