Le 22/08/2017 à 16:26, niharika singhal a écrit :
Hello I have a vector
v=c(0.0886,0.1744455,0.1379778,0.1209769,0.1573065,0.1134463,0.2074027)
when i do
sum(v)
or
0.0886+0.1744455+0.1379778+0.1209769+0.1573065+0.1134463+0.2074027
i am getting output as 1
But if i add them manually i get
Try options(digits=12)
sum(v)
BTW I don't get the same value as you did when you calculated manually.
On Tuesday, August 22, 2017, 10:39:26 AM EDT, Bert Gunter
wrote:
... and following up on Spencer's answer, see the "digits" argument of
?options and ?print.default.
Cheers,
Bert
Bert Gunter
... and following up on Spencer's answer, see the "digits" argument of
?options and ?print.default.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On 2017-08-22 9:26 AM, niharika singhal wrote:
Hello I have a vector
v=c(0.0886,0.1744455,0.1379778,0.1209769,0.1573065,0.1134463,0.2074027)
when i do
sum(v)
or
0.0886+0.1744455+0.1379778+0.1209769+0.1573065+0.1134463+0.2074027
i am getting output as 1
No: That's only the display:
4 matches
Mail list logo