[R] Making TIFF images with rtiff

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Fri Jan 12 15:51:56 CET 2007

Inman, Brant A. M.D. wrote:
> Thanks to all the responders.  Here are some replies to the comments:
> 1) Concerning the term TIFF "format".
> It may be that the journals are misusing the term TIFF, but it would
> also appear that wikipedia is as well. The first sentence in the wiki
> link sent below states:
> "Tagged Image File FORMAT (abbreviated TIFF) is a file FORMAT for mainly
> storing images, including photographs and line art."
> Either way, the semantics of the word TIFF are probably not that
> important for the current query.  If a publisher wants images in TIFF, I
> would like to provide them in that format, regardless of whether or not
> I deem the request proper.  After all they are the publishing experts!
> 2) Converting PNGs to TIFFs with Photoshop.
> This is principally what I have done in the past that has given the poor
> results that I have noted. I thought that it could be something that I
> was specifically doing wrong so I consulted the medical imaging and
> design department of my institution (Mayo Clinic) which informed me that
> there is often a loss of information, some times quite large, in these
> types of image format conversions. They suggested that it is best to
> work with the TIFFs from the start if possible, which is why I am trying
> to explore this option in R.  It is interesting that my imaging
> department was able to convert the WMF format to TIFF with much better
> success.  However, since Photoshop does not support WMFs, I am unable to
> do this myself.  I have downloaded ImageMagick and will try that.
> 3)Lack of gratitude by R users.
> It is interesting to note upon reviewing the R-help files that many
> queries (perhaps even the majority?) do, in fact, convey gratitude.
> Unfortunately, I have also noted that there are several messages from R
> developers that appear to feel underappreciated. I suspect that one
> reason that R is experiencing an explosion of users is precisely that
> people appreciate and value the donation of free time provided by
> statistical experts--such as Harrell, Weigand, Ripley and Kort in this
> thread--for the development of accurate and powerful statistical
> software.  Furthermore, the support provided for the software in the
> form of R-help is outstanding, again something that I think is part of
> the package deal that is attracting new users to R.  In other words, one
> should not assume a general lack of gratitude on behalf of R-help users
> but should see the growth of R as evidence that the software and its
> developpers/supporters are indeed greatly valued.  I do not think that R
> would be used much if people did not appreciate the nice packages,
> functions and help provided.  Indeed, those of us that have access to
> multiple software programs (I have access to JMP, SPSS, SPLUS and SAS)
> choose R as our primary method of analysis because we feel that the
> sharing environment supported by CRAN is a better way of doing
> statistical computing.  Enough said.
> 4)Flexible journal policies.
> Of 4 papers that I have submitted in the last 3 months for publication
> in 3 journals (all to cancer related journals), all were subjected to
> online file checkers that forced me to upload TIFF files instead of
> PDFs.  Not only do they check the format, but also various other
> resolution related items. In other words, I would not have even made it
> past the online submission stage if I only PDFs to work with. 
> 5)Using the bitmap function to make TIFFs.
> This sounds like a very attractive option.  I have tried this option
> using the simple code below:
> -------------
> attach(cars)
> plot(speed ~ dist)	# Simple plot to test
> bitmap(file='C:\\...\\test.tif',type = "tifflzw", res = 1200)
> Error in system(paste(gsexe, "-help"), intern = TRUE, invisible = TRUE)
> : 
>         gswin32c.exe not found
> -------------
> Despite what the error message suggests, I do have a functional
> Ghostscript 8.54 program installed on my Windows XP machine with the
> executable found in the directory: C:\Program
> Files\gs\gs8.54\bin\gswin32c.  I am not sure why R is not finding the
> program.  I tried making a Windows environmental variable, R_GSCMD, with
> this system address but that did not have any success.  Does the
> gswin32c file need to be in my R PATH?
It needs to be in your Path. If you open up a "DOS box" and type
gswin32c, I bet you get the same error message. You can fix this by
editing the Path (via My Computer/Properties/Advanced/Environment
variables, as you seem to know). If you use the R_GSCMD route, you may
get in trouble with the embedded space in "Program Files" ("dir/x c:"
will tell you the equivalent space-free name). Also, remember that
environment changes do not affect running programs so you may need to
exit R and restart.

   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907

More information about the R-help mailing list