# Check if there are NAs in the time or id variable
# (and drop them but warn the user about it)
if (sum(is.na(dat[[id]])) > 0) {
warning(
"There is a missing value in your id variable. The missing value is automatically deleted."
)
dat <- dat[!is.na(get(id)), col_names, with = FALSE]
}