I tried to run the code below to rename the column titles of my dataframe. I definitely have the same number of columns as I have names given. Cannot understand why this seems to work sometimes and not work other times. Have tried putting spaces in or switching the ' to a ". Sometimes this makes it work, only for it to fail the next time I run it. Feel like its gaslighting me!!!
You have a rogue single quote character at the start of the word "Article". Make sure you only use ASCII single or double quote characters around text strings - and avoid any so-called smart quote characters that are used in some text editors and word-processing software.
Hi thanks for that, see how you were confused by my post - I did paste the error in underneath but not very clear. I replied to my own post to say I'd sorted it, not sure why that didn't come up! Useful to know about colnames any way,
Thanks