[Rd] Display image in tcl/tk information window: path to file ?

Romain Francois romain.francois at dbmail.com
Thu Sep 17 14:15:45 CEST 2009


?system.file

for example (if the file lives in inst/images of your source package)

system.file( "images", "MaxC2res3image.gif", package = "yourpackage" )

Romain

On 09/17/2009 02:09 PM, Ulrike Groemping wrote:
> 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


-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/yw8E : New R package : sos
|- http://tr.im/y8y0 : search the graph gallery from R
`- http://tr.im/y8wY : new R package : ant



More information about the R-devel mailing list