"Unknown or uninitialised column" error

A reprex would be great so we can help you. See here welcome post here: Welcome to the RStudio Community!

install.packages('reprex')
library(reprex)

Copy all of your code, including the libraries, and run command reprex() in the console. Then copy paste the results here. Feel free to censure your directory names with ... as you did before.