I\'m developing my first R package (using R 2.13, Ubuntu 10.10). Let\'s call it foo and let\'s say that the code in the R/ directory begins with the line libra
The mechanism to do this is to add an entry in the depends field in your DESCRIPTION file.
Depends: bar
This will load the bar library if already installed, otherwise will install it from CRAN.
This is described in section 1.1.1 of the Writing R extensions manual: http://cran.r-project.org/doc/manuals/R-exts.html#The-DESCRIPTION-file