# TODO add these to tests
cars.df = as.disk.frame(cars, nchunks = 4)
# removes 3rd chunk
remove_chunk(cars.df, 3)
nchunks(cars.df) # 3
# removes 4th chunk
remove_chunk(cars.df, "4.fst")
nchunks(cars.df) # 3
# removes 2nd chunk
remove_chunk(cars.df, file.path(attr(cars.df, "path", exact=TRUE), "2.fst"), full.names = TRUE)
nchunks(cars.df) # 1
# clean up cars.df
delete(cars.df)
Run the code above in your browser using DataLab