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)
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) >
Hi 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 know that pdf() adds similar "Creator" information. I don't recall seeing anything like this for the raster devices, but I've worked less with them so I don't know for sure. Paul> 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) > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel-- Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 paul at stat.auckland.ac.nz http://www.stat.auckland.ac.nz/~paul/