R/check_meta.R

Defines functions check_meta

Documented in check_meta

#' Check metadata
#'
#' Checks for duplicate names and filters if file doesn't exist on the current
#' machine
#'
#' @param meta
#' @return
#' @author Alec L. Robitaille
#' @export
check_meta <- function(meta) {
	N_name <- meta[, .N, by = name]$N

	if (any(N_name) > 1) stop('found duplicates in "name" column, check metadata')

	return(meta[file.exists(path)])
}
robitalec/prepare-locs documentation built on Jan. 30, 2024, 9:45 a.m.