Here is my code:
x<-c(1,2)
x
names(x)<- c(\"bob\",\"ed\")
x$ed
Why do I get the following error?
Error in x$ed
You get this error, despite everything being in line, because of a conflict caused by one of the packages that are currently loaded in your R environment.
So, to solve this issue, detach all the packages that are not needed from the R environment. For example, when I had the same issue, I did the following:
detach(package:neuralnet)
bottom line: detach all the libraries no longer needed for execution... and the problem will be solved.