Julie Sheard (and @galinajonsson ) have both been creating data for occDetFuncoutside of formatOccData, in order to integrate multiple data types. Julie has run into a problem in which the visits are not unique (i.e. an error in her data prep code). It should be very easy to check this and return a useful error message. In fact, there are two checks:
Julie Sheard (and @galinajonsson ) have both been creating data for
occDetFunc
outside offormatOccData
, in order to integrate multiple data types. Julie has run into a problem in which the visits are not unique (i.e. an error in her data prep code). It should be very easy to check this and return a useful error message. In fact, there are two checks:nrow(occDetdata) == nrow(spp_vis)
length(unique(occDetdata$visit)) == nrow(occDetdata)
length(unique(spp_vis$visit)) == nrow(spp_vis)
If these checks fail, it should be easy to return an informative error, such as: