[Rd] Identifying graphics files produced by R

Romain Francois romain.francois at dbmail.com
Sat Feb 14 09:57:58 CET 2009


Hi,

I don't know the answer but here is how I would try to get it from the 
source:

$ cd  R-devel/src
$ grep -R "R Software" *
Binary file library/grDevices/src/grDevices.so matches
library/grDevices/src/devPS.c:    fprintf(fp, "%%%%Creator: R Software\n");
Binary file library/grDevices/src/devPS.o matches

$ wc library/grDevices/src/*.c
   426   1928  10606 library/grDevices/src/chull.c
   195    658   5395 library/grDevices/src/devNull.c
   775   2771  24480 library/grDevices/src/devPicTeX.c
  7592  26813 212324 library/grDevices/src/devPS.c
  1375   5342  48939 library/grDevices/src/devQuartz.c
  3401  12322 100782 library/grDevices/src/devWindows.c
    75    273   2113 library/grDevices/src/init.c
   189    807   7436 library/grDevices/src/qdBitmap.c
   165    646   5416 library/grDevices/src/qdPDF.c
 14193  51560 417491 total

Somewhere in the 14193 lines of code is your answer. Probably also worth 
looking in the  modules/X11/ and unix directories

Romain

-- 
Romain Francois
Independent R Consultant
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr




David M Smith wrote:
> Oftentimes, I see graphs on the web that *look* like they've been
> produced by R, but I can never be sure.  Or can I?  I notice that
> PostScript files include a "%%%Creator: R Software" line, but do R
> graphics drivers encode any identifying information in GIF or PNG
> files more commonly used on the web?  And of so, would such evidence
> necessarily be obliterated in post-processing (e.g cropping)?
>
> I'm trying to do an informal survey of R's use to create statistical
> graphics on the web, and if there's a way to identify graph files I
> see as coming from R it would help a lot.
>
> Thanks,
> # David Smith
>
> --
> David M Smith <david at revolution-computing.com>
> Director of Community, REvolution Computing www.revolution-computing.com
> Tel: +1 (206) 577-4778 x3203 (Seattle, USA)
>



More information about the R-devel mailing list