I want to plot a boxplot within another plot
So far I have:
require(ggplot2)
require(grid)
plot(unlist(cbind6),type="p",cex=1.5,xlab="Sample", ylab="CNI", pch=21,bg="red", main= "CNAs")
pp<-boxplot(combined,main="CNAs", xlab="Samples", ylab="CNVs",pch=20, outline=FALSE,col=c("red","green","black"))
print(pp, vp=viewport(.8, .75, .2, .2))
However when I try to run this I line that runs plot(unlist(cbind6).... runs fine but the boxplot does not get put into the left hand corner as its supposed to and instead I get a an output called $stats and $n and conf etc which I assume are boxplot stats. How do I get the plot as I want and why cant I get the boxplot to print?