Added type.convert to data.frame creation step