On Tuesday's call, Dan mentioned that there are limitations of the existing ways of transferring data to and from R using the clipboard.
The ExcelsiR package includes functions for reading and writing to the clipboard. I'm running into a problem though: it seems that Excel by default converts its numbers to strings when adding them to the clipboard, so that a number displayed as, for instance, "3", then it will get transferred to R as 3.0 even if the full value is 3.14159 in Excel. This seems clearly undesirable.
Most strategies I've seen involve parsing the contents of a clipboard as a string in order to figure out the data type (e.g. date, number, currency, etc.). However, in the case of 3 = 3.14159 above, it seems that basic information may never make its way into the clipboard. Perhaps instead we need a special copy function run from Excel (written in VBA or C++) that encodes the data into the clipboard in a way the default copy operation doesn't.
Does anyone know how the windows clipboard works or have any insight into this?
Another question I have involves date handling which is another troublesome spot for Excel<->R integration. Unfortunately R suffers from an overabundance of date formats. What is everyone's favorite date format? If you copied and pasted dates from Excel to R, what format would you like them to come through in?
Finally, do any of you use Excel times? Clearly getting dates right is important, but what priority should time of day have? Thanks for any input.