search for: r_accuracy

Displaying 15 results from an estimated 15 matches for "r_accuracy".

Did you mean: accuracy
2009 Jun 08
4
seq(...) strange logical value
Do you heve any idea why I get after this instruction everywhere false? > seq (0, 1, by=0.1) == 0.3 [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE But after different step it's ok: > seq(0, 1, by=0.1) == 0.4 [1] FALSE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE -- View this message in context:
2012 Apr 10
1
Double precision calculation
Dear all, Does R use double precision for calculation as default? If not, how to enforce double precision calculation in R for my current calculation session? I Use R-2.14.0 with windows XP. Thanks,
2012 Aug 16
1
sum over extremely small numbers
Dear All, I am evaluating the value of loglikelihood and it ends up with the sum of tiny numbers. Below is an example: suppose I would like to calculate sum_i (log (sum_j x [i, j] )), the index of log (x) is in the range, say (-2000, 0). I am aware that exp(-744.5) will be expressed as 0 in 32 bit R and exp Is there a way to improve the result? R example: powd <- sample(-2000:0, 100,
2009 Nov 11
1
Unexpected behaviour of seq(from,to,by) (PR#14057)
Full_Name: Raimon Massanet Version: 2.9.2 OS: Linux Ubuntu 8.10 Submission from: (NULL) (147.83.71.76) # Hi there. # I'm not sure whether or not this is a bug. # But it surely is an unexpected behaviour. V <- seq(from=0,to=1,by=0.1) # Should generate a sequence with a step of 0.1 V==0 # [1] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE # Ok! V==0.1 # [1] FALSE
2010 Jan 19
3
problem with the precision of numbers
Hi All, I was wodering if it is possible to increase the precision using R. I ran the script below in R and MAPLE and I got different results when k is large. Any idea how to fix this problem? thanks for your help for (k in 0:2000){ s=0 for(i in 0:k){ s=s+((-1)^i)*3456*(1+i*1/2000)^3000 } } -- View this message in context:
2010 Nov 28
5
unexpected behavior using round to 2 digits on randomly generated numbers
Hello! I stumbled upon something odd that took a while to track down, and I wanted to run it by here to see if I should submit a bug report. For randomly generated numbers (from a variety of distributions) rounding them to specifically 2 digits and then multiplying them by 100 produces strange results on about 8% of cases. The problematic numbers display as I would have expected, but do not
2009 May 13
3
simple add error (PR#13699)
Full_Name: Gostan Thierry Version: 2.6.1 (2007-11-26) OS: Windows XP Submission from: (NULL) (193.49.190.42) I cannot explain why R seems to have problems adding two big numbers. sprintf("%f",10^4+10^19) gives "10000000000000010240.000000" instead of "10000000000000010000.000000" problems seems to arrive when i'm trying to add a big and a
2012 Mar 01
4
problem with sum function
Hi! I'm running R version 2.13.0 (2011-04-13) Platform: i386-pc-mingw32/i386 (32-bit) When i type in the command: sum(c(-0.2, 0.8, 0.8, -3.2, 1.8)) R returns the value: -5.551115e-17 Why doesn't R return zero in this case? There shouldn't be any rounding error in a simple sum. Thanks, Mark
2010 Mar 29
2
.Call and .C arguments
---------- Forwarded message ---------- From: Roger.Bergande at swisslife.ch Date: Mon, 29 Mar 2010 13:51:12 +0200 Subject: .Call and .C arguments To: bergarog at gmail.com Dear List My question is about .C and .Call I was experimenting with the .C and .Call interface as I came across the following behaviour. The passed values are not the same in C. I 'm calling a function in C with
2010 Dec 20
6
sample() issue
> length(sample(25000, 25000*(1-.55))) [1] 11249 > 25000*(1-.55) [1] 11250 > length(sample(25000, 11250)) [1] 11250 > length(sample(25000, 25000*.45)) [1] 11250 So the question is, why do I get 11249 out of the first command and not 11250? I can't figure this one out. Thanks Cory [[alternative HTML version deleted]]
2012 Jun 18
6
Inconsistency using seq
Hi all, Is there any problem of precision when using seq?. For example: x<- seq(0,4,0.1) x[4]=0.3 BUT: x[4]-0.3=5.551115e-17 It means when I use this condition within an if clause, it does not find values with 0.3 for x[4] as it is not precisely 0.3. Is there any bug in seq() ? -- View this message in context: http://r.789695.n4.nabble.com/Inconsistency-using-seq-tp4633739.html Sent from
2009 Aug 01
5
incorrect result (41/10-1/10)%%1 (PR#13863)
Full_Name: jan hattendorf Version: 2.9.0 OS: XP Submission from: (NULL) (213.3.108.185) I get an incorrect result for (41/10-1/10)%%1 [1] 1 The error did not occur with other numbers than 41 (1, 11, 21, 31, 51, ...) test <- rep(NA, 1000) for(i in 1:1000){ test[i] <- i/10-1/10 } test[test%%1==0]
2009 Mar 16
4
Match .3 in a sequence
Hello:I am trying to match the value 0.3 in the sequence seq(.2,.3). I get > 0.3 %in% seq(from=.2,to=.3) [1] FALSE Yet > 0.3 %in% c(.2,.3) [1] TRUE For arbitrary sequences, this "invisible .3" has been problematic. What is the best way to work around this? Thank you. Dan [[alternative HTML version deleted]]
2011 Mar 04
4
Floating points and floor() ?
Perhaps somebody could clarify for me if the following is a floating point matter or otherwise, and how am I to correct for it? > floor(100*.1) [1] 10 > 100*(1.0-.9) [1] 10 > floor(100*(1-0.9)) [1] 9 Thanks! Michael _______________________________________________________ Michael Folkes Salmon Stock Assessment Canadian Dept. of Fisheries & Oceans Pacific Biological Station
2012 Feb 10
3
problem subsetting data frame with variable instead of constant
Hello, I've encountered a very weird issue with the method subset(), or maybe this is something I don't know about said method that when you're subsetting based on the columns of a data frame you can only use constants (0.1, 2.3, 2.2) instead of variables? Here's a look at my data frame called 'ea.cad.pwr': *>ea.ca.pwr[1:5,] MAF OR POWER 1 0.02 0.01 0.9999 2 0.02