0

There are lot of files and I need to install DMwr package https://cran-archive.r-project.org/web/checks/2021/2021-03-16_check_results_DMwR.html (as it is removed from CRAN) for windows. There is not a single tutorial to download the package hanits installation process.

OR is there any alternate package which I could use in place of DMwR package?

Phil
  • 7,287
  • 3
  • 36
  • 66
xrxrxrxxr
  • 89
  • 1
  • 7

1 Answers1

0

First ensure that you have all the dependencies of DMwR installed:

Depends: R(>= 2.10), methods, graphics, lattice (>= 0.18-3), grid (>= 2.10.1)

Imports: xts (>= 0.6-7), quantmod (>= 0.3-8), zoo (>= 1.6-4), abind (>= 1.1-0), rpart (>= 3.1-46), class (>= 7.3-1), ROCR (>= 1.0)

and then run this:

u <- "https://cran.r-project.org/src/contrib/Archive/DMwR/DMwR_0.4.1.tar.gz"
install.packages(u)
G. Grothendieck
  • 254,981
  • 17
  • 203
  • 341
  • I am using R 4.0.5. Already tried tis and getting error - Warning in install.packages : package ‘https://cran.r-project.org/src/contrib/Archive/DMwR/DMwR_0.4.1.tar.gz’ is not available for this version of R A version of this package for your version of R might be available elsewhere, see the ideas at https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages – xrxrxrxxr May 01 '21 at 17:09
  • 1
    @xrxrxrxxr, I can run the code here without that error. Your warning suggests that your URL does not start with `"https://"`, instead starting with `"cran.r-project..."`. This is important since `install.packages`'s code includes this check: `any(web <- grepl("^(http|https|ftp)://", pkgs))`, suggesting that by starting the url with `cran`, the function will look for that verbatim package name. Try this code *verbatim* and, assuming all of its dependencies listed here are installed, it should install without problem. (R – r2evans May 01 '21 at 19:03
  • Warning in install.packages : package ‘u’ is not available for this version of R A version of this package for your version of R might be available elsewhere, see the ideas at https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages – xrxrxrxxr May 02 '21 at 17:12
  • You have introduced an error by putting quotes around u. By doing that you are telling it that the name of the package is literally u. Please follow the answer exactly. – G. Grothendieck May 02 '21 at 17:16
  • Also tried that but getting warning like this-- Warning in install.packages : package ‘https:// cran.r-project.org/src/contrib/Archive/DMwR/DMwR_0.4.1.tar.gz’ is not available for this version of R A version of this package for your version of R might be available elsewhere, see the ideas at https:// cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages – xrxrxrxxr May 02 '21 at 17:32
  • This package is not available at CRAN. Is there is any alternate package for version 4.0.5? – xrxrxrxxr May 02 '21 at 17:34
  • What version of R do you have? It worked for me using "R version 4.0.4 Patched (2021-03-05 r80091)" on Windows. – G. Grothendieck May 02 '21 at 17:58