R: api to split_join_distance