3

I am attempting to update the ‘nlme’ package so that I can use great circular distances for the correlation in the gls command. I'm attempting to edit the source code with the changes specified here.

I am unsure about how to proceed in re-compiling the package with the updated source code. I am able to edit the source within the .tar.gz, but when I try to install the package from my local folder, I receive:

Installing package into ‘C:/Users/HSRG1/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
* installing *source* package 'nlme' ...
files 'R/corStruct.R', 'R/gls.R', 'R/lme.R' have the wrong MD5 checksums
** libs

*** arch - i386
ERROR: compilation failed for package 'nlme'
* removing 'C:/Users/HSRG1/Documents/R/win-library/3.0/nlme'
Warning messages:
1: running command '"C:/PROGRA~1/R/R-30~1.0/bin/x64/R" CMD INSTALL -l  "C:\Users\HSRG1\Documents\R\win-library\3.0" "nlme_3.1-111.tar.gz"' had status 1 
2: In install.packages("nlme_3.1-111.tar.gz", repos = NULL, type = "source") :
installation of package ‘nlme_3.1-111.tar.gz’ had non-zero exit status

The functions R/corStruct.R', 'R/gls.R', 'R/lme.R are those which I am trying to edit. I do not know what this error means, particularly the bit about having incorrect checksums (I suspect the other errors follow). I found the following link: http://r.789695.n4.nabble.com/R-3-0-0-wrong-MD5-checksums-for-Windows-td4663348.html which discusses a different linebreak command which is implemented when compiling from Windows, but I do not know how this is relevant (or soluble) as the source has no linebreak declarations.. There is clearly something I'm missing.

I am using a Windows 64 bit computer - please let me know if there is any other information I need to provide.

UPDATE: As suggested I have tried to implement the corRGaus correlation in the ramps package. When I try to use the corRGaus correlation I get the following error:

y = runif(50, 1, 40)
x = runif(50, 1,20)
LC= c(rep(1,25), rep(2,25))
lat = runif(50,-90,90)
long = runif(50,180,180)
fit <- lme(y ~ x,random = ~x|LC, cor = corRGaus(form = ~lat+long))


Error in `coef<-.corSpatial`(`*tmp*`, value = value[parMap[, i]]) : 
NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning messages:
1: In nlminb(c(coef(lmeSt)), function(lmePars) -logLik(lmeSt, lmePars),  :
NA/NaN function evaluation
2: In nlminb(c(coef(lmeSt)), function(lmePars) -logLik(lmeSt, lmePars),  :
NA/NaN function evaluation
3: In nlminb(c(coef(lmeSt)), function(lmePars) -logLik(lmeSt, lmePars),  :
NA/NaN function evaluation
4: In nlminb(c(coef(lmeSt)), function(lmePars) -logLik(lmeSt, lmePars),  :

I am not sure what this error means, nor how to remedy it.

As a side note, after installing ramps, I am no longer able to use the corGaus correlation until restarting R (even if I detach the ramps package).

BartoszKP
  • 34,786
  • 15
  • 102
  • 130
Sarah
  • 731
  • 7
  • 15
  • It's not so much that we need further infomation, rather it's that we need to know that you have made an effort to read the Installation and Administration Manual. And which parts of it were not clear and what errors were produced? – IRTFM Sep 12 '13 at 20:12
  • I'm not quite sure, but are you sure you need to recompile `nlme`? It *seems* although I could be mistaken that the `ramps` package has correlation structures that could be used, e.g. `corRGaus` ... ??? – Ben Bolker Sep 12 '13 at 21:10
  • @Ben Bolker: Thanks for the idea! I have looked into the ramps package - and it looks like it will produce what I want. I am unfortunately having trouble implementing any of the ramps correlation structures. Any further help would be greatly appreciated. – Sarah Sep 13 '13 at 19:52
  • That nabble.com link above doesn't work (any more). ~~~ The error "have the wrong MD5 checksums" isn't specific to nlme or MS Windows. It happens with any package if you edit any source files, even under Linux. – Quigi Dec 06 '21 at 20:12

0 Answers0