[r] Split a vector into chunks