Supposedly you want to install some old version of a package called ggplot2, you can do this as follows:
pkgurl <- "http://cran.r-project.org/src/contrib/Archive/ggplot2/ggplot2_0.9.1.tar.gz"
install.packages(pkgurl, repos=NULL, type="source")
If this doesn't work for you (if you are on windows) it is probably because of the lack of particular toolchain required for building and compiling packages.
Normally we will install a pre-compiled binary from CRAN who will only archive package sources, not binaries which means we will have to install Rtools in order to compile everything locally