Displaying 20 results from an estimated 11000 matches similar to: "precision issue?"
2006 Jun 30
3
Creating Vectors
type count
0 20
1 15
0 10
1 35
0 28
I would like to create two vectors from the data above. For example,
type1=c(15, 35) and type0 = c(20, 10, 28). Can any one help
Raphael
2017 May 24
1
precision of do_arith() in arithmetic.c
To the R development team:
First of all, thank you so much for maintaining wonderful R software.
Perhaps, Dr. Ahn has just reported an error on the wilcox.test() function,
and suggesting that an error may arise from abs() and rank().
I just had a quick check that the problem may come from the precision of
the results of arithmetic functions.
87.7-89.1+1.4
# > 87.7-89.1+1.4
# [1]
2006 Nov 29
3
comma delimiter & comma in text
Hi
I have data like
1, A, 24, The Red House
2, A, 25, King's Home, by the Sea
...
I'd like to read this in as three variables. I first tried
temp <-read.csv(addresses, sep = "," ) it worked but line 2 was broken after
King's Home, and by the Sea as placed in another line. and so i eneded up
with more number of rows than in the data. when i tried
temp
2010 Feb 01
2
numerical subscripts in a loop in a plot
Hi R Graphics Gurus
I am unable to figure out this issues with unevaluated expressions. I'm trying to create a graphic where I calculate the residual from a regression and want to mark each residual with its observation number. So something like
plot(0,0, type = "n", xlim = c(0,10))
for(i in 1:10){
text(i, 0, substitute(paste(epsilon[i])))
}
except that i end up pasting
2006 Mar 29
2
write.table command
Dear All,
I'm trying to save a dataframe using write.table command. It works, but when I retrieved, there's an error message as shown below:
> write.table(soil.dat,file="C:/soil.rdata")
> load("C:/soil.rdata")
Error: bad restore file magic number (file may be corrupted)-- no data loaded
I can figure out the error message. Any assistance to solve the
2006 May 01
6
R-2.3.0 make error
Dear list,
When compiling the R-2.3.0 on FC4 x86_64, I got the following errors:
make[3]: Entering directory
`/project/scratch3/ligroup/wuming/src/R-2.3.0/src/main'
gcc -Wl,--export-dynamic -L/usr/local/lib64 -o R.bin Rmain.o
CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o apply.o
arithmetic.o apse.o array.o attrib.o base.o bind.o builtin.o
character.o coerce.o colors.o complex.o
2020 May 20
2
Precision of function mean,bug?
> On Wednesday, May 20, 2020, 7:00:09 AM EDT, peter dalgaard <pdalgd at gmail.com> wrote:
>
> Expected, see FAQ 7.31.
>
> You just can't trust == on FP operations. Notice also
Additionally, since you're implementing a "mean" function you are testing
against R's mean, you might want to consider that R uses a two-pass
calculation[1] to reduce floating
2020 May 20
2
Precision of function mean,bug?
Hello R-dev,
Yesterday, while I was testing the newly implemented function pmean in
package kit, I noticed a mismatch in the output of the below R expressions.
set.seed(123)
n=1e3L
idx=5
x=rnorm(n)
y=rnorm(n)
z=rnorm(n)
a=(x[idx]+y[idx]+z[idx])/3
b=mean(c(x[idx],y[idx],z[idx]))
a==b
# [1] FALSE
For idx= 1, 2, 3, 4 the last line is equal to TRUE. For 5, 6 and many
others the difference is small
2010 Jan 08
3
Newbie question on precision
Hi all,
How can I get R to change the default precision value? For example:
> x=0.99999999999999999
> 1-x
[1] 0
>
Is there a way that I can get a non-zero value using some parameter, or some package?
many thanks.
[[alternative HTML version deleted]]
2010 Oct 18
2
Where precision change
Hello everyone.
I need some help to understand when number precision in R is set. For this
please consider the following example
for (i in c(2:length(final))){
sizex <- c(sizex,(final[i]-final[i-1],digits=2))) # round is used to remove
values that are too small like e-17.
print(round(final[i]-final[i-1],digits=2))
}
final[2]-final[1] return something like 4.440892e-16, which
2010 Jul 29
1
precision of minus operation and if statments
Hi Everyone,
as part of a larger script, I need to insert the result of a simple minus
operation into an if statement.
I have noticed that the precision that appear on the screen is not the precision
in which R stores the result of the minus operation, and that this change alters
the result of the if statement. For example, when running this simple script:
> a=0.90
> b=0.95
>
2007 Oct 31
2
R WinEdt on Windows vista
Hi!
I was trying to install the RWinEdt library on a Windows Vista machine which had R 2.6.0, WinEdt 5.4 and the RWinEdt1.7.8.zip file in the library folder under the ...\R\2.6.0 directory. I am able to install fine form the local zip but I can't launch winedt from within R for some reason.
> utils:::menuInstallLocal()
package 'RWinEdt' successfully unpacked and MD5 sums checked
2005 May 25
5
precision problem
I have prices that I am finding difficult to compare with ==, > and >,
due to precision. For example: the numbers should match, with '==',
but they differ in the magnitude of 1e-14 due to bunch of calculations
that I run on them. Programming with java, I am used to implementing a
function that compares the difference between the numbers to a pre
determined precision factor. This
2018 Feb 26
3
Precision in R
Hi,
Why sum() on a 10-item vector produces a different value than its
counterpart on a 2-item vector? I understand the problems related to
the arithmetic precision in storing decimal numbers in binary format,
but shouldn't the errors be equal regardless of the method used?
See my example:
> options(digits=22)
> x=rep(.1,10)
> x
[1] 0.10000000000000001 0.10000000000000001
2013 Apr 24
1
Floating point precision causing undesireable behaviour when printing as.POSIXlt times with microseconds?
Dear list,
When using as.POSIXlt with times measured down to microseconds the default format.POSIXlt seems to cause some possibly undesirable behaviour:
According to the code in format.POSIXlt the maximum accuracy of printing fractional seconds is 1 microsecond, but if I do;
options( digits.secs = 6 )
as.POSIXlt( 1.000002 , tz="", origin="1970-01-01")
as.POSIXlt( 1.999998 ,
2006 Oct 25
1
cloud() works but wireframe() is blank
Per the message from Alexander Nervedi, 29 April 2006:
> I have to be making a riddiculously silly ommission.
> when I run the fillowing i get the cloud plot ok. But I cant figure
> out what I am missing out when I call wireframe.
> Any help would be appreciated.
> x<-runif(100)
> y<-rnorm(100)
> z<-runif(100)
> temp <-data.frame(x,y,z)
>
2019 Sep 11
4
Fw: Calling a LAPACK subroutine from R
Berend,
I do not think this works with gfortran 7+. I am calling the BLAS
subroutine dgemv from Fortran code in my package eha, and the check
(with R-devel) gives:
gmlfun.f:223:1: warning: type of ?dgemv? does not match original
declaration [-Wlto-type-mismatch]
& score, ione)
^
/home/gobr0002/R/src/R-devel/include/R_ext/BLAS.h:107:1: note: type
mismatch in parameter 12
2019 Sep 11
4
Fw: Calling a LAPACK subroutine from R
Sorry for cross-posting, but I realized my question might be more appropriate for r-devel...
Thank you,
Giovanni
________________________________________
From: R-help <r-help-bounces at r-project.org> on behalf of Giovanni Petris <gpetris at uark.edu>
Sent: Tuesday, September 10, 2019 16:44
To: r-help at r-project.org
Subject: [R] Calling a LAPACK subroutine from R
Hello R-helpers!
2006 Dec 12
1
strings as factors
Hi,
To be able to match cases with a benchmark I need to have a data.frame with
a character id variable. however, I am surprised why this seems to be so
hard. In fact I was unable to succeed. Here is what I tried:
>test1 <-expand.grid(ID = 1:2, sex = c("male","female"))
>is(test1[,2])
[1] "factor" "oldClass"
>test2 <-expand.grid(ID =
2019 Sep 12
1
Calling a LAPACK subroutine from R
Followup:
I have checked my package nleqslv which uses dgemv only from Fortran, on Kubuntu 18.04 with the development version of R.
No errors or problems.
Berend
> On 12 Sep 2019, at 08:57, Berend Hasselman <bhh at xs4all.nl> wrote:
>
>
> I have tried what I proposed in a virtual Kubuntu 18.04 which uses gfortran 7.4.
> I used the latest development version of R.
>