R/util-check_data.R

Defines functions check_data

check_data <- function(data) {
  if (ncol(data$data) != length(data$resources)) {
    stop("data and resource sizes must match")
  }

  if (!all(data$starts + data$lengths - 1 <= ncol(data$data))) {
    stop("data lengths don't match its shape")
  }
}

Try the BKT package in your browser

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

BKT documentation built on April 4, 2025, 12:20 a.m.