R/read.CowLog.R

`read.CowLog` <-
function (file, start.time = NULL, delete.duplicates = TRUE) 
{
    data <- read.table(file)
    names(data) <- c("time", "behavior")
    data <- data[order(data$time), ]
    if (delete.duplicates == TRUE) {
        data <- delete.duplicates(data)
    }
    if (is.null(start.time) == FALSE) {
        start <- as.POSIXct(start.time)
        data$time <- start + data$time
    }
    data
}

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.