piwik

dimecres, 8 d’octubre del 2014

Installing older version of R package due to a dependency issues, ERROR: dependency ‘goftest’ is not available for package ‘spatstat’

When trying to install the latest version of spatstat from CRAN repos, I got the following error:

ERROR: dependency ‘goftest’ is not available for package ‘spatstat’

that's because there is no goftest package available for R 3.0.2, and it is required for installing spatstat, so what I've done is going through the previous version of the spatstat package and downloaded the latest version that doesn't require goftest package, which is 1.37 so I went ahead and downloaded it and install it manually:

R CMD INSTALL spatstat_1.37-0.tar.gz

dimarts, 7 d’octubre del 2014

no DISPLAY variable so Tk is not available for R

When installing a R package that requires a Display variable to be set and we are connecting from another machine using SSH, we may be prompt with those errors:

> library(tcltk)
Warning message:
In fun(libname, pkgname) : no DISPLAY variable so Tk is not available


or

error reading package index file /usr/local/R/lib/tcltk2/tklibs/ipentry0.3/pkgIndex.tcl: too many nested evaluations (infinite loop?)

To fix this, we may either install the package from a computer using graphical environment or connecting through SSH but forwarding X:

cat /home/josep/.ssh/config

host *
GSSAPIAuthentication=no
StrictHostKeyChecking=ask
UsePrivilegedPort yes
KeepAlive=yes
ForwardX11Trusted yes
ForwardAgent yes
ServerAliveInterval 240
ForwardX11 yes