Error: object 'nwdemo' not found

Hi Khanh,

Has you created or loaded the nwdemo data before use it in this function?

Maybe in the page 12 of this documentation you can find the solution.

When you make a question, I recommend using reprex to make it easier to resolve it.