f <- tempfile(fileext = ".vtr")
write_vtr(mtcars, f)
# Delete the first and third rows (0-based indices 0 and 2)
delete_vtr(f, c(0, 2))
result <- tbl(f) |> collect()
stopifnot(nrow(result) == nrow(mtcars) - 2L)
unlink(c(f, paste0(f, ".del")))
Run the code above in your browser using DataLab