I eveluated both itertools::ichunk and itertools2::ichunk, and the first (at least for me) looks more logical while trying to handle objects which length not divisible by chunk_size. For example I have vector v=1:5 and want to obtain list(c(1,2), c(3,4), c(5)), is it possible with itertools2::ichunk?
I eveluated both
itertools::ichunkanditertools2::ichunk, and the first (at least for me) looks more logical while trying to handle objects which length not divisible by chunk_size. For example I have vectorv=1:5and want to obtainlist(c(1,2), c(3,4), c(5)), is it possible withitertools2::ichunk?