[R] Odp: How to read percentage and currency data?
ggrothendieck at gmail.com
Thu Feb 25 00:10:54 CET 2010
On Wed, Feb 24, 2010 at 11:28 AM, Petr PIKAL <petr.pikal at precheza.cz> wrote:
> r-help-bounces at r-project.org napsal dne 24.02.2010 16:55:49:
>> Removing the % signs by Ista's method works. However as I noted earlier,
>> was hoping there was a more elegant solution which deals with percentage
>> currency values without knowing about their presence beforehand.
>> It's a shame that something which Excel deals with trivially is such a
>> in R. I'll try to delve deeper and write something which does this well.
>> my knowledge is limited and I will probably come back for help.
> I believe that if you introduce a new class which could specify currencies
> you could write methods for handling them. But it is beyond my knowledge
> and somebody else has to answer it.
Try adapting this example of using a custom class with read.table:
or this example of piping through tr to read.table:
More information about the R-help