I am trying to save a plot created by ggplot in R and trying to save it in PNG8 format. But couldn't find out anywhere on how to save it in PNG 8 format. Could someone help me out? Here is what I have:
pdf("barplot1.pdf")
library(ggplot2)
days <- c("SAT", "SUN")
revenue <- c(100,150)
d <- data.frame(days = factor(c("SAT","SUN"), levels = c("SAT", "SUN")), revenue)
ggplot(data = d, aes(x=as.factor(days), y= revenue))+geom_bar(stat= "identity", fill= "blue")
dev.off()