Dear All I have problem with this: > IWJR.temp <-IWJR.missing[sample(1:length(IWJR.missing),1),] Error: subscript out of bounds How I can solved this. Thanks IRD