I have dataset, which negative value is presented with a bracket around the number i.e. (10)==-10
, it is in csv format, how can I process it so that R will interpret the (10)
as -10
? Thank you.
UPDATE
I know I can work it out by replacing (
as -
, remove )
, and use as.numeric
afterwards, but is there a more elegant way for this issue?
If you create an "as.acntngFmt" method for the accounting format, you can read (or perhaps re-read with a text connection using colClasses("acnt").