Get library and load in 1 step?

trinker

ggplot2orBust
Often I see a package I want and I download it and then imediately load it using the install.packages() and library() functions. Well I'm lazy and want to combine this into one step (and not have to type out install.package). So I attempted to write a function to do that. The function gets the library but then will not load it. Why? I can load it then with library(package name) but I can't make it do both install and load in one step. I included the error code as well.

Code:
get.lib<-function(package){
pack1<-substitute(package)
pack<-as.character(pack1)
install.packages(pack)
library(package)
}
Code:
get.lib(car)
Installing package(s) into ‘C:/Users/Documents/R/win-library/2.14’
(as ‘lib’ is unspecified)
trying URL 'http://lib.stat.cmu.edu/R/CRAN/bin/windows/contrib/2.14/car_2.0-10.zip'
Content type 'application/zip' length 755493 bytes (737 Kb)
opened URL

package ‘car’ successfully unpacked and MD5 sums checked

Error in library(package) : there is no package called ‘package’

Dason

library(pack, character.only = TRUE)
eval(parse(text = paste("library(", pack,")")))