0
votes

I am trying to install the R package MixeR 2003 by Batagelj and Bren . This is not in CRAN, but is accessible on this website as a downloadable zip file containing an R file (MixeR.R), a dataset (Glac.dat) and 3 pdf's.

I downloaded the zip file, and placed it in my R directory. After that, I attempted to install it from within RStudio using the drop-down menus Tools > Install Packages > Package Archive File (.zip; .tar.gz) > MixeR.zip, getting the following error message:

install.packages("~/R/MixeR.zip", repos = NULL, type = "win.binary")

Installing package into ‘C:/Users/Documents/R/win-library/3.3’

(as ‘lib’ is unspecified)

Warning in install.packages : cannot open compressed file 'MixeR/DESCRIPTION', probable reason 'No such file or directory'

Error in install.packages : cannot open the connection

What am I doing wrong, and how can I install this package?

It may very well be that it is actually not a package, but rather a 'library', in which case I would appreciate guidance as to how to make the functions and datasets in it accessible to the R session.

1

1 Answers

1
votes

If you download and extract you'll see that that it's some pdfs, a .dat file, and a single R script that contains a bunch of functions.

Likely you just want to source the script so you want to extract the zip archive and then use source on MixeR.R

source("path/to/MixeRArchive/MixeR.R")

Alternatively they do host that file on their website directly so you could just read it from the internet directly

source("http://vlado.fmf.uni-lj.si/pub/MixeR/MixeR.R")

Either way will read the functions directly into your global environment since it isn't an actual package with its own namespace.