Installing an archived package "bs"

each time I try to install "bs" package which is archived I get the message below. I need help. I am learning

> install.packages(packageurl, repos=NULL, type="source")
Installing package into ‘C:/Users/User/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL ''
Content type 'application/x-gzip' length 18061 bytes (17 KB)
downloaded 17 KB

* installing *source* package 'bs' ...
ERROR: a 'NAMESPACE' file is required
* removing 'C:/Users/User/Documents/R/win-library/3.4/bs'
Warning messages:
1: running command '"C:/PROGRA~1/R/R-34~1.3/bin/i386/R" CMD INSTALL -l "C:\Users\User\Documents\R\win-library\3.4" "C:/Users/User/AppData/Local/Temp/RtmpaOkmUw/downloaded_packages/bs_1.0.tar.gz"' had status 1 
2: In install.packages(packageurl, repos = NULL, type = "source") :
  installation of package ‘C:/Users/User/AppData/Local/Temp/RtmpaOkmUw/downloaded_packages/bs_1.0.tar.gz’ had non-zero exit status

This is a very old package, and there have been many changes to R since it was archived. The one that’s currently causing you trouble is that as of R 2.14.0, all packages were required to contain a NAMESPACE file in order to be installed (see:

There was a transitional period where R would attempt to auto-generate a namespace file for packages that lacked one, but that behavior was also removed eventually (I haven’t yet tracked down when!).

You could download the package source, create a namespace file for it (for instance, like this), and then try building it from source.

The challenge then, however, is that this package was written back when R was much younger, and many things have changed. If it’s code (rather than just a data package), it’s entirely possible that it won’t work properly even if you can get it installed. At that point, your fallback option is probably to install an old version of R to run the package with — or find another way to do what you want without this package!

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.