R/delete.duplicates.R

`delete.duplicates` <-
function (obs) 
{
    obs2 <- obs
    for (i in 2:nrow(obs)) {
        if (obs$behavior[i] == obs$behavior[i - 1]) {
            obs2$behavior[i] = "repeated"
        }
    }
    obs <- obs2[obs2$behavior != "repeated", ]
}

Try the Animal package in your browser

Any scripts or data that you put into this service are public.

Animal documentation built on May 2, 2019, 5:48 p.m.