0

I created a R package. The DESCRIPTION file of this package is as follows:

Package: Ralgotree
Type: Package
Title: package about securiy information
Version: 1.0
Date: 2013-02-15
Author: algotree
Maintainer: algotree<dinoop@algotree.com>
Description: package about securiy information
License: GPL(>=2)
Suggests: RJSONIO,stringr,RSQLite,bigmemory,Rook,compare,plyr,lubridate,xts
Depends: RJSONIO,stringr,RSQLite,bigmemory,Rook,compare,plyr,lubridate,xts

It depends on other packages like RJSONIO,stringr etc. So whenever i try to install my package in other machine using the following commands

R CMD build Ralgotree
R CMD INSTALL Ralgotree

it showing the following error messages:

* installing to library ‘/usr/local/lib/R/site-library’
ERROR: dependencies ‘RJSONIO’, ‘stringr’, ‘RSQLite’, ‘bigmemory’, ‘Rook’, ‘compare’, ‘plyr’, ‘lubridate’, ‘xts’ are not available for package ‘Ralgotree’

So i need to do install all packages like this install.packages("RJSONIO").

Is it possible to install all uninstalled packages when we run R CMD INSTALL Ralgotree command? Thanks

Dinoop Nair
  • 2,663
  • 6
  • 31
  • 51

2 Answers2

2

Try,

install.packages("mypkg", dependencies = TRUE)
Kumar
  • 314
  • 3
  • 5
  • 16
1

I do not see that as an option in the arguments listed when I run:

R CMD INSTALL --help

The install.packages R function does have a "dependecies" argument which when TRUE (or the proper character vector) will gather a list of packages from the Description file and install them as well.

?install.packages
IRTFM
  • 258,963
  • 21
  • 364
  • 487