[R] How to read percentage and currency data?
Hrishi Mittal
hrishimittal at gmail.com
Wed Feb 24 12:15:04 CET 2010
I'm struggling to find any help on this seemingly simple question - how does
one read data with percentage (%) or currency (£,$ etc.) signs? When I try
to read a data file which has any of those symbols in the data fields, they
are read as characters rather than values. Is there a function or library
which can deal with such values?
As an example, I use this sample from one of chinna's questions:
Store Year Revenue
abc 2010 $557889
def 2010 $697356
Similarly, for percentage values:
Product Sale1 Sale2 Sale3 Sale4 Sale5 Sale6 Sale7
A 101.00% 93.00% 85.00% 65.00% 74.00% 102.00% 119.00%
B 585.00% 484.00% 599.00% 653.00% 726.00% 882.00% 1035.00%
C 18.00% 19.00% 25.00% 15.00% 31.00% 33.00% 33.00%
D 23.00% 22.00% 31.00% 30.00% 36.00% 42.00% 49.00%
E 35.00% 41.00% 49.00% 40.00% 48.00% 48.00% 53.00%
F 19.00% 20.00% 33.00% 16.00% 20.00% 26.00% 28.00%
-----
Try http://prettygraph.com Pretty Graph , the easiest way to make R-powered
graphs on the web.
--
View this message in context: http://n4.nabble.com/How-to-read-percentage-and-currency-data-tp1567318p1567318.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list