Unable to activate visual mode (document contains example lists which are not currently supported)

Warning message at the top:
Unable to activate visual mode (document contains example lists which are not currently supported)

rmd script is quite large and not suitable to copy and paste here. Any ideas or suggestions are more than welcome.

You can try a bisection search. Make a copy of the document and cut out about half the content. If the reduced document works, the problem is in the half you cut out, so switch to that. Cut the reduced document in half again and repeat until you've narrowed down the location of the problem to something that you either recognize as buggered or is brief enough (and sufficiently devoid of state secrets) that you can publish it here.