Issue with R version 3.5.1

I recently installed R version 3.5.1. It worked fine for couple of days and then started giving error on using any command e.g.

A = 2
Error in .Call("rs_hasExternalPointer", obj, TRUE) :
C symbol name "rs_hasExternalPointer" not in load table

A = "a"
Error in .Call("rs_hasExternalPointer", obj, TRUE) :
C symbol name "rs_hasExternalPointer" not in load table

Here's the version information (I am using in on a windows server 2012 R2 standard)

version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 5.1
year 2018
month 07
day 02
svn rev 74947
language R
version.string R version 3.5.1 (2018-07-02)
nickname Feather Spray

Any help will be appreciated. Thanks!

I tried working with base R and it seems to be working fine. So, I reinstalled RStudio and I am not getting the error anymore. So, I guess the issue was related to the RStudio and not R.

Thanks!