Code of function 'createfactor.ds' slightly amended.