Dear Ulrike,
If I understand correctly what you want to do, the image file is stored in
your package. If so, you can use the .path.package() function to locate your
package on the file system. For example, the Rcmdr uses the following code
to find its etc subdirectory: file.path(.path.package(package=Rcmdr)[1],
etc).
I hope this helps,
John
--
John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
web: socserv.mcmaster.ca/jfox
-Original Message-
From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org]
On
Behalf Of Ulrike Groemping
Sent: September-17-09 8:10 AM
To: r-devel@r-project.org
Subject: [Rd] Display image in tcl/tk information window: path to file ?
Dear DevelopeRs,
for an R-Commander plugin, I want to display a pre-stored information
image,
if the user presses a button. Everything works fine with the command
tcl(image, create, photo, MaxC2.image, file=MaxC2res3image.gif)
for image creation, as long as the file entry refers to the correct
location
of the file on my hard drive. How can I make this portable ?
I currently have the image stored in the inst directory. R CMD INSTALL
--build moves it to the top directory in the zip file. I have no idea how
to tell R (or tcl) where to look for the file. Any help is appreciated!
Best regards,
Ulrike
*
Ulrike Groemping
BHT Berlin
--
View this message in context:
http://www.nabble.com/Display-image-in-tcl-tk-
information-window%3A-path-to-file---tp25490113p25490113.html
Sent from the R devel mailing list archive at Nabble.com.
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel