[R-sig-Geo] Problems with adehabitat and gpclib

Roger Bivand Roger.Bivand at nhh.no
Mon Jan 20 10:29:41 CET 2014


On Mon, 20 Jan 2014, Isabella Mandl wrote:

>
> Hello everyone,
>
> I'm quite new to R and have done a few basic Intro tutorials so far. To
> clarify: I'm using the newest version of R (3.0.2.) with RStudio on a
> Windows 7 PC.
>
> I intend on using R to draw up and analyse LoCoH home ranges for a small
> data set I have. Now I'm trying to familiarise myself with /adehabitat/
> and /adehabitatHR/.
> However, when I try to run through the tutorials with the sample data I
> encounter problems with the package /gpclib/. I have done some research
> on in and I understand that /gpclib/ requires a permit and shouldn't be
> used - apparently the package /rgeos/ can substitute  for it. This,
> however does not seem to work for me.
>
> If I try to install /gpclib/ (from a download as no binary version
> available for windows) I get this:

(unless you have installed R-tools, you cannot install source packages on 
Windows, because they need compilers that you do not have, hence the 
error).

Did you go to:

http://cran.r-project.org/bin/windows/contrib/r-release/ReadMe

from:

http://cran.r-project.org/web/packages/gpclib/index.html

and then read:

"Packages
 	RSvgDevice, RSVGTipsDevice, StreamingLm, TwoPhaseInd, eco, gpclib,
 	ifa, translate
are not checked nor distributed due to crashes under Windows or
extremely unstable check results that switch forth and back between OK
and ERROR or WARNING."

So there is a good reason for the Windows binary not being provided, see:

http://www.r-project.org/nosvn/R.check/r-release-windows-ix86+x86_64/gpclib-00check.html

This is over and above the known licence issue with gpclib.

The date on the tutorial you refer to is 2005, so you can safely assume 
that its shelf-life is exceeded.

Please do refer to adehabitatHR and the functions provided there, unless 
you really need to reproduce research done with the source you refer to. 
LoCoH.k.area() and LoCoH.k() work as expected in the example given in 
?LoCoH.k for current R:

> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-unknown-linux-gnu (64-bit)
...
other attached packages:
  [1] rgeos_0.3-2         maptools_0.8-27     adehabitatHR_0.4.10
  [4] adehabitatLT_0.3.14 CircStats_0.2-4     boot_1.3-9
  [7] MASS_7.3-29         adehabitatMA_0.3.8  ade4_1.6-2
[10] deldir_0.1-1        sp_1.0-14

loaded via a namespace (and not attached):
[1] foreign_0.8-57  grid_3.0.2      lattice_0.20-24 tcltk_3.0.2
[5] tools_3.0.2

Unless authors of online "advice" instrument their contributions to track 
developments in the software used, they shouls always include the output 
of sessionInfo(), so that those needing to reproduce their results can 
install *those versions* of the software. On CRAN, all versions are still 
available in archive sections, so we try as hard as we can to permit 
reproduction of results, but you may not have access to the hardware 
and OS used (so OS and hardware bugs may not be reproducible).

Hope this clarifies,

Roger

>
>> install.packages("C:/Users/Isabella/Downloads/gpclib_1.5-5.tar.gz", repos = NULL, type = "source")
> Installing package into 'C:/Users/Isabella/Documents/R/win-library/3.0'
> (as 'lib' is unspecified)
> * installing *source* package 'gpclib' ...
> ** package 'gpclib' successfully unpacked and MD5 sums checked
> ** libs
> ERROR: compilation failed for package 'gpclib'
> * removing 'C:/Users/Isabella/Documents/R/win-library/3.0/gpclib'
> Warning in install.packages :
>   running command '"C:/PROGRA~1/R/R-30~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Isabella\Documents\R\win-library\3.0" "C:/Users/Isabella/Downloads/gpclib_1.5-5.tar.gz"' had status 1
> Warning in install.packages :
>   installation of package 'C:/Users/Isabella/Downloads/gpclib_1.5-5.tar.gz' had non-zero exit status
>
>
> Consequently I tend to get this message:
>
> In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
>   there is no package called 'gpclib'
>
>
> This here is the closest what I found to relate to my problem but I
> don't really understand what to do:
> http://tlocoh.r-forge.r-project.org/manual_install.html
> This was the tutorial I'm trying to walk through:
> http://locoh.cnr.berkeley.edu/rtutorial
>
> What I am looking for now are is some easy-to-understand guidance of how
> to get /adehabitat/ to work without /gpclib/ *OR* how to get /gpclib/ to
> work.
>
> Please let me know if you need more information or what I am doing
> wrong, I'm grateful for any help.
>
> Cheers, Bella
>
>
>
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list