Hi, I am not sure what Tcl/Tk you are running, but it is most likely that
[R] does not find the Tcl/Tk software. You have installed a Tcl/Tk software
seperately from [R] have you? I am running ActiveTcl 8.3.2 myself. You can
get it from http://dev.scriptics.com. When you install it, it most likely
installed into
C:\Program Files\Tcl\
You have to add then C:\Program Files\Tcl\bin\ (**\bin\**) to the system
environment variable PATH. If this is not correctly done I get the following
error:
> library(tcltk)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library "C:/PROGRA~
1/R/RW1041/library/tcltk/libs/tcltk.dll":
LoadLibrary failure: One of the library files needed to run this
application cannot be found.
Error in library(tcltk) : .First.lib failed
>From within [R] you can update your PATH as below:
> PATH <- Sys.getenv("PATH")[[1]]
> PATH2 <- paste(PATH, "C:\\Program Files\\Tcl\\bin\\",
sep=";")
> Sys.putenv(PATH=PATH2)
> library(tcltk)
>
and it works. If this works just add
SET PATH=%PATH%;C:\PROGRA~1\TCL\bin
to C:\AUTOEXEC.BAT and you never have to do the Sys.getenv()/Sys.putenv()
above. If you are running Cygwin with bash you also have to add
export PATH="$PATH:/c/program files/tcl/bin/"
to your general-bashrc file or similar.
Cheers
Henrik Bengtsson
Dept. of Mathematical Statistics @ Centre for Mathematical Sciences
Lund Institute of Technology/Lund University, Sweden (+2h UTC)
Office: P316, +46 46 222 9611 (phone), +46 46 222 4623 (fax)
h b @ m a t h s . l t h . s e, http://www.maths.lth.se/bioinformatics/
> -----Original Message-----
> From: owner-r-help at stat.math.ethz.ch
> [mailto:owner-r-help at stat.math.ethz.ch]On Behalf Of Ignacio Perez Velez
> Sent: Monday, March 25, 2002 5:29 AM
> To: R-help at stat.math.ethz.ch
> Subject: [R] Problems installing Tcl/Tk
>
>
>
> Hi!
>
> Two questions:
>
> 1.-I am trying to put Tcl/tk to work. I keep getting the following:
>
> >Error in dyn.load(x, as.logical(local), as.logical(now)) :
> > unable to load shared library
> "C:/RW1041/library/tcltk/libs/tcltk.dll":
> >LoadLibrary failure: No se puede hallar uno de los archivos de
> biblioteca
> necesarios para ejecutar esta aplicaci?n.
> >Error in library(tcltk) : .First.lib failed
>
> I've tried what is suggested on th R-FAQ and done what Professor Ripley
> recommended on a previous request identical to mine posted to this list on
> February. I can?t get things to work.
>
> 2.-I am working with Windows ME in Spanish. I've tried what is
> suggested on
> the R-FAQ to avoid crashing by downloading msvcrt.dll and putting on the
> R/bin directory. It keeps crashing. Any suggestions?.
>
> Sorry if this questions were already asked, but I can't put
> things to work.
> Thanks in advance
>
>
> Ignacio Perez
>
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> -.-.-.-.-.-.-
> r-help mailing list -- Read
> http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> _._._._._._._
>
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._