Hi Satendar,
The sample dataset has numerical and categorical and it run correctly. Were you able to execute the code as is (without any changes) and produce the Word document?
Note that you will the docx package.
If you were able to execute the code as is, then is it possible to provide a sample dataset? May be you can upload to some shared cloud drive and provide me the link. If you are using some commercially sensitive data please note to anonymise the data.
Alternatively even if you provide me a list of column names and one sample data, I can try to reproduce your issue.