Problem in GGPLOT

Facing these problems-

  1. Installing package into ‘C:/Users/Diksha/Documents/R/win-library/3.5’
    (as ‘lib’ is unspecified)

  2. Error: package or namespace load failed for ‘ggplot2’ in get(Info[i, 1], envir = env):
    cannot open file 'C:/Users/Diksha/Documents/R/win-library/3.5/plyr/R/plyr.rdb': No such file or directory.

Not able to overcome this.

Did you try to install the plyr package?

NO.. Wats dat? Is it necessary to install it?

Every time I m trying to install any package, it shows-
{
Installing package into ‘C:/Users/Diksha/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/ggplot2_2.2.1.zip'
Content type 'application/zip' length 3157805 bytes (3.0 MB)
downloaded 3.0 MB

package ‘ggplot2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\Diksha\AppData\Local\Temp\Rtmp0OBmUc\downloaded_packages

}

but when I run the ggplot command, it shows-
{
Error in ggplot2(data = mydata, aes(x = carat, y = price)) :
could not find function "ggplot2"
}

Plz Help.

there is no function called ggplot2... The function is named, ggplot... the package name is ggplot2

Error in ggplot(data = mydata, aes(x = carat, y = price)) :
could not find function "ggplot"

NOW THIS..

Have you specified library(ggplot2) first?

after you installed ggplot2 did you load ggplot2 by running:

library(ggplot2)

yes.. showed this-
Error: package or namespace load failed for ‘ggplot2’ in get(Info[i, 1], envir = env):
cannot open file 'C:/Users/Diksha/Documents/R/win-library/3.5/lazyeval/R/lazyeval.rdb': No such file or directory

yes.. showed this-

Error: package or namespace load failed for ‘ggplot2’ in get(Info[i, 1], envir = env):
cannot open file 'C:/Users/Diksha/Documents/R/win-library/3.5/lazyeval/R/lazyeval.rdb': No such file or directory

Try reinstalling lazyeval: install.packages('lazyeval')

Then restart R and see what happens.

same error.. again and again...

How can I completely remove R from system?
as I am doing and reinstalling, it starts from the same program which I had left before uninstalling.?

Can you restart R/RStudio then try this?

depends on your operating system. Here's the Windows instructions: R for Windows FAQ

Thanks.. It worked....

Thanks.... It worked,,,,,