Skip to content
Prev 33084 / 63421 Next

loadNamespace and useDynLib

I've also experienced this problem with RGraphviz and suggest you expand
the message to: Graphviz version x found at c:\...whatever...\graphviz.dll
but version y found at http://whatever required.

Another approach would be to check that the file size, file name,
checksum or some other attribute of the needed
version matches the version found.  That way you could give the
error message before loading the dll.

A third approach would be to provide an R command that downloads
and installs the correct version of graphviz to reduce the possibility
of error in the first place.  The user must be connected
to the internet for that to work.  For example, in Ryacas, if yacas
itself is not located when the package loads a message is given
to run the command:
  yacasInstall()
Running that command from within R downloads the correct yacas*.zip file,
unpacks it and installs the components.  See:

http://ryacas.googlecode.com/svn/trunk/R/yacasInstall.R
http://ryacas.googlecode.com/svn/trunk/man/yacasInstall.Rd

That won't prevent the wrong version from being used but it makes
it much less likely.

On Wed, Jun 24, 2009 at 1:46 AM, Kasper Daniel
Hansen<khansen at stat.berkeley.edu> wrote: