It was worth a shot, but the same errors were still returned, except for the error with the arrange function. I fixed this. It was due to a missing object in the function call. Restarting and changing things so many times makes it easy to forget to run a segment every now and then.
Is there a way to see which code line is causing the warnings? This may help.
I know I am not the only one with this problem: Persistent "Unknown or uninitialised column" warnings
If a reproducible example is needed, this one should do it. Maybe I should tag it as a bug?