Dear Khun Boonyarat,
Thanks to your guidance, the code is now operating flawlessly. I spent two days searching the internet for a solution to no avail, and prior to this, I had no prior experience with R, and I encountered numerous difficulties while using it in this class when original code isn’t working. Once again, I want to extend my heartfelt thanks. If you hadn’t shared the code in the picture, I would have been unable to resolve these issues. You’ve made a positive difference in my life. 🙂 🙂
During the class presentation in web, I noticed that your code remained identical to the original version, yet it did not produce any errors and ran smoothly. Could you please explain why this is the case?