0

I'm coding a R package, and in DESCRIPTION file:

Imports: stringr,splitstackshape

in NAMESPACE file:

import(splitstackshape)
import(stringr)

but when i load this package locally:

install.packages("~/Desktop/DCR_0.1.0.tar.gz", repos = NULL, type = 
"source")
ERROR: dependency ‘stringr’ is not available for package ‘DCR’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/DCR’

so, how to make it automatically load dependent packages when i install package by .gz file?

user20650
  • 24,654
  • 5
  • 56
  • 91
Crow Zhao
  • 1
  • 1
  • try adding the option `dependancy = TRUE` in `install.packages` – Amar May 07 '18 at 12:04
  • well, i try to use it `install.packages("~/Desktop/DCR_0.1.0.tar.gz", repos = NULL, type = "source",dependencies = TRUE) ERROR: dependency ‘stringr’ is not available for package ‘DCR’ * removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/DCR’` but it did not solve the problem。 – Crow Zhao May 07 '18 at 12:59
  • https://stackoverflow.com/questions/25017195/install-a-local-r-package-with-dependencies-from-cran-mirror?answertab=votes#tab-top – user20650 May 07 '18 at 14:16

0 Answers0