Hi, I'm trying to make a scatter plot with the size of the points representing the "estimate" and the color of the points representing "est.dir". I have my code below to show how I am doing that so far.
Here is where I am getting stuck. I want the insignificant points ("p.value" > 0.5 ) to be gray , with the rest having color based on "est.dir". Many thanks!
#create dummy dataset
estimate<-c(-1.5,2.5)
est.dir<-c("neg","pos")
p.value<-c(0.001,0.1)
lat<-c(62,68)
long<-c(22,28)
df<-data.frame(estimate,est.dir,p.value,lat,lon)
#make scatterplot
library(ggplot2)
ggplot(data=dataset,
aes(x=lon,y=lat,size=estimate^2,colour=estdir))+
geom_point()