[Rd] Adding text comments to graphics device output files?
Simon Urbanek
simon.urbanek at r-project.org
Wed Jul 31 16:17:39 CEST 2013
On Jul 31, 2013, at 12:12 AM, Henrik Bengtsson wrote:
> Hi Duncan,
>
> this is perfect timing. Your
> https://github.com/duncantl/png/blob/master/testMeta.R example
> illustrates what I'm looking for.
>
> Yes, it would be great if this would be incorporated into the 'png' package.
>
Ok, I have added support for both text chunks and arbitrary R metadata to the PNG package.
http://rforge.net/png
The it is based on Duncan's idea, but the implementation and API is different -- Duncan's approach was implemented before png has support for the PNG info, so it is now simply extending that concept. You can store native text key/values pairs. In addition, R-native matadata can be attached -- it is stored as a special key "R.metadata" holding the serialization of the R object. See the last example in
http://rforge.net/doc/packages/png/writePNG.html
Feedback is welcome.
Cheers,
Simon
> Thanks,
>
> Henrik
>
> On Tue, Jul 30, 2013 at 8:04 PM, Duncan Temple Lang
> <dtemplelang at ucdavis.edu> wrote:
>>
>> Hi Henrik
>>
>> I have some extensions of Simon U's png package
>> to read and write metadata elements for PNG.
>> They are at
>> https://github.com/duncantl/png.git
>>
>> When I have time to completely test them, maybe Simon
>> may incorporate them.
>>
>> D.
>>
>> On 7/30/13 7:59 PM, Henrik Bengtsson wrote:
>>> Hi,
>>>
>>> several image file format supports textual/meta data comments in one
>>> way or the other. For me an obvious usage would be to add
>>> sessionInfo() information to PNG and PDF image files, ideally from
>>> within R although external tools would work as well(*). Has anyone
>>> looked into this or have any suggestions or comments?
>>>
>>> /Henrik
>>>
>>> (*) One could even imagine including self-contained R
>>> scripts/vignettes within such comments.
>>>
>>> ______________________________________________
>>> R-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>>
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
More information about the R-devel
mailing list