[R] Data.frame issue (pls help)
Ivan Calandra
ivan.calandra at uni-hamburg.de
Mon Mar 8 16:41:02 CET 2010
Hi,
I cannot really test since your dataframe is completely distorted, but
what happens if you try: format(QuoteBID, nsmall=5)?
I think it's just a matter of printing, which uses the number of digits
from options(digits=).
See: ?options, ?format, etc.
But I'm not an expert and cannot really test for this.
HTH
Ivan
Le 3/8/2010 14:15, GULATI, BRIJESH (Global Markets FF&O NY) a écrit :
> Hi:
> I want to obtain a particular value from a data.frame. Following is my
> dataframe:
>
>
>> Quotes
>>
> BID ASK
> Name
> CT2 GOVT 99.92969 99.9375 CT2
> TUM0 COMDTY 108.53125 108.5469 TUM0
> CT5 GOVT 100.10156 100.1094 GT5
> FVM0 COMDTY 115.56250 115.5703 FVM0
> TYM0 COMDTY 116.93750 116.9531 TYM0
>
> If I try to run: QuoteTUM0BID = Quotes[Quotes$Name %in% "TUM0", "BID"]
> and print QuoteTUM0BID, I get 108.5312, instead of 108.53125 as an
> answer. Please let me know why is it ignoring the last digit.
>
>
> Additional Information.
> If I run QuoteBID = Quotes[, "BID"], I get the whole array in which TUM0
> BID is 108.53125 (a correct number).
>
>
> Thanks in advance...
> Rgds,
> Brijesh
>
>
>
> --------------------------------------------------------------------------
> This message w/attachments (message) may be privileged, ...{{dropped:30}}
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
--
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. Säugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra at uni-hamburg.de
**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php
More information about the R-help
mailing list