Yes, I could do a Reprex, but the problem is not with the code - which works fine- but rather with the Rhtml version accessing the data set when knitted. There aren't any variables in the environment not created by the code, all libraries are specified, etc, as I have done other rhtml documents by now which worked just fine. This time, I had to load the data from an external source, because of problems downloading a gz file, hence the source of the problem. I need to establish a path between the data set and the root directory.