Ggplot2 package is not showing post installation and library("ggplot2") and not even under tidyverse package

ggplot2

#1

getting the below error while executing the ggplot2 script

ggplot(loandefcomplete, aes(x=status, y=account_id)) + geom_point(colors("navy"))+ xlab("status")+ylab("accounts") + ggtitle("account vs loan status")

Error in if (distinct) c[!duplicated(t(col2rgb(c)))] else c :
argument is not interpretable as logical


#2

When loading packages you can't put the package name in quotes. Try these instead:

library(tidyverse)
library(ggplot2)

#3

tried that also but its not working even no error threw


#4

Are you sure that the packages were installed correctly?


#5

Actually, you can. It's only due to R's (quirky) non-standard evaluation that the quotes may be omitted.


#6

Weird! I always thought it had to be quote-less.


#7

:100:% sure...got successful installation message at the end...but failed to see in library


#8

Can anyone help me? I'm stuck with this


#9

Can you copy and paste the output you get when you run this line?

find.package("ggplot2")
find.package("tidyverse")
.libPaths()

#10

Thanks now its working


#11

getting error while running the below command -
visual1 <- ggplot(loandef, aes(x=status, y=account_id)) + geom_point(colors("navy")+ xlab("status")+ylab("accounts")) + ggtitle("account vs loan status"))

Error: unexpected ')' in "visual1 <- ggplot(loandef, aes(x=status, y=account_id)) + geom_point(size = 2.5, colors("navy")+ xlab("status")+ylab("accounts")) + ggtitle("account vs loan status"))"


#12

Your closing parenthesis to your geom_point function is in the wrong place.

Try this:

visual1 <- ggplot(loandef, aes(x=status, y=account_id)) + 
  geom_point(color = "navy")+ 
  xlab("status")+
  ylab("accounts") +
  ggtitle("account vs loan status") 

#14

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)


#15