Error creating notebook: non-numeric argument to binary operator; RStudio

Viewed 4232

There is an error located in the upper left hand corner of my RStudio setup which reads "Error creating notebook: non-numeric argument to binary operator". (According to Stack Overflow, you can access the image here.)

enter image description here

I've noticed that this error is likely the issue preventing me from modifying my html file on rpubs.com which is rather problematic.

Any advise as to the root or possible causes of this error and/or solutions would be greatly appreciated. I'm hoping to be able to upload a corrected version of my file to rpubs.

4 Answers

The following method worked for me to fix this error:

I went into my user folder on my local disk drive > AppData (this is a hidden folder so you have to "Show hidden items") > Local > RStudio-Desktop > notebooks

And then I deleted the folder with the name that corresponds to the .rmd file that has this error. So for you, you would look for the folder that has "Assignment3Code" in its name, and delete it.

Then go back to RStudio and save the code again, the associated notebook should be generated.

If this does not help, the notebook cache may be also stored in the project directory under .Rproj.user -> [Some hex nums] -> unsaved-notebooks OR .Rproj.user -> shared -> notebooks where you may need to delete the corresponding directories as well.

Session > Restart R and Clear Output worked for me. I saved and re-saved .Rmd file with no problems after using this.

Deleting *.nb.html file in the same directory as .Rmd helped in my case.

Related