Error: could not find function "install.packages"

Error Information:

When I open the R console, I get this error message: "Error: could not find function "install.packages"". I'm not sure how to fix this...

I've installed the new R console version 4.0.3, but the error keeps coming up -

System Information:

  • RStudio Edition: (Desktop or Server)
  • RStudio Version: 1.2.5033
  • OS Version: 10.15.3
  • R Version:

Also:

  • RStudio diagnostics report:
  • Your sessionInfo():
  • RStudio crash report:
  • RStudio application log files:

From Troubleshooting Guide: Using RStudio

You need to install R. Then restart RStudio. R is the underlying language engine, RStudio is just an interface. They are separate products. Install R first, then RStudio.