Displaying 20 results from an estimated 1000 matches similar to: "integrate function (PR#9557)"
2007 Nov 23
1
Bug in pacf -- Proposed patch (PR#10455)
Dear all,
following the thread
http://tolstoy.newcastle.edu.au/R/e2/devel/07/09/4338.html
regarding the bug in the partial autocorrelation function for
multivariate time series.
I have prepared a web page with patches and relevant information.
http://www2.stat.unibo.it/giannerini/R/pacf.htm
Please do not hesitate to contact me for further clarifications
regards
Simone
--
2020 May 18
1
parRapply and parCapply return a list in corner cases
According to ?parCapply:
parRapply and parCapply always return a vector.
This appears not to be the case in the following minimal reproducible example:
> library(parallel)
> nslaves <- 2
> cl <- makeCluster(nslaves)
> X <- matrix(2,nrow=3,ncol=4)
> X <- rbind(c(1,1,0,1),X)
> tv <- parCapply(cl,X,FUN=function(x){
+
2023 Sep 23
2
NROW and NCOL on NULL
Dear list,
I do not know what would be the 'correct' answer to the following but
I think that they should return the same value to avoid potential
problems and hard to debug errors.
Regards,
Simone
---------------------------------------
> NCOL(NULL)
[1] 1
> NROW(NULL)
[1] 0
> sessionInfo()
R version 4.3.1 RC (2023-06-08 r84523 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
2008 Jun 05
2
qf with infinite df
Dear all,
I found the following behaviour
> rf(5,Inf,Inf)
[1] 1 1 1 1 1
but
> qf(0.1,Inf,Inf)
[1] NaN
Warning messages:
1: In qf(0.1, Inf, Inf) : value out of range in 'lgamma'
2: In qf(p, df1, df2, lower.tail, log.p) : NaNs produced
incidentally,
> pf(1.00000000000001,Inf,Inf)
[1] 1
> pf(1.0000000000000001,Inf,Inf)
[1] 0.5
Is this the expected behaviour?
Thanks
2016 Apr 05
2
Under Windows, Rgui and Rterm crash if one tries to close the graphic device while identify or locator are running
minimal reproducible example
plot(1,1)
identify(1,1) # or locator()
now, trying to close the window by clicking on the cross of the upper
right corner causes Rgui (and Rterm) to crash.
I see the same behaviour on 2 different Windows PC (one with Win 8.1
and one with Win 10).
I did not see the problem in linux (see below)
WINDOWS **************
> sessionInfo()
R version 3.3.0 beta
2008 Sep 05
2
typo in cov()? var() fails on NA in R 2.7.2 but not R 2.6.1
I recently started using R 2.7.2, and noticed a surprising change in
the behavior of var() on NA data:
R 2.6.1 (Patched), 2007-11-26, svn.rev 43541, x86_64-unknown-linux-gnu:
> stdev(rep(NA,3), na.rm=F)
[1] NA
> stdev(rep(NA,3), na.rm=T)
[1] NA
> var(rep(NA,3), na.rm=T, use="complete.obs")
[1] NA
R 2.7.2 (Patched), 2008-09-02, svn.rev 46491,
2008 Dec 26
1
/bin/windows/base/rpatched.html page out of date
Dear all,
it looks like that something is wrong with the
/bin/windows/base/rpatched.html page as it seems pointing to the
2.8.1rc version.
Also, I do not know if it is relevant but notice the dates of the
following files on
ftp://ftp.stat.math.ethz.ch/Software/CRAN/bin/windows/base/
R-2.8.1pat-win32.exe 31963 KB 22/12/2008 16.15.00
R-2.8.1rc-win32.exe 31991 KB 25/12/2008 9.30.00
thank
2009 Jan 08
1
legend() in a multiple figure environment
Dear all,
there seems to be a problem with displayed legends when a multiple
figure environment is used, see the following example:
par(mfrow=c(1,2))
curve(dnorm,col=4,from=-4,to=4);
legend(-4,0.3,legend="curve",lty=1,col=4)
legend(-4,0.2,legend="curve",lty=1,col=4)
On my machines the first time the command legend() is issued the
legend box stretches over the curve.
2007 May 09
1
fix() changes the class of mts objects
Dear all,
it looks like fix() changes the class of mts objects, here is a reproducible
example (tested both on WinXP and Linux):
> x <- ts(cbind(1:5,1:5))
> x
Time Series:
Start = 1
End = 5
Frequency = 1
Series 1 Series 2
1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
> class(x)
[1] "mts" "ts"
> edit(x)
2007 Feb 26
1
Is there any package on CRAN that uses Fortran-90/95
Hi!
Is there any package on CRAN that uses Fortran-90/95? I would like
to study it.
Thanks, Gregor
2009 Nov 20
1
make fails on R r50499 ( openSuSE 11.0 x86-64)
Dear all,
I encountered a problem when compiling the source of R patched 2.10.0
r50499 (19-11-2009)
linked to ACML single threaded (4.2.0 or 4.3.0)
OS: openSuSE 11.0 x86-64
make fails when it comes to installing mgcv with the following
[snip]
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(i[[1L]], c(lib.loc, .libPaths())) :
non esiste un pacchetto chiamato
2012 Dec 29
1
bug in plot.ts?
Dear all,
I think I have found a buglet in plot.ts
plot.ts(x=1,type="n") # correct: does not show the plot
plot.ts(x=1,y=1,type="n") # not correct: does show the plot
I did not investigate the problem in depth but it could be related to
the switch xy.labels, in fact
plot.ts(x=1,y=1,type="n",xy.labels=TRUE) # does show the plot
2011 May 04
3
Error in .Fortran Call
I have the following FORTRAN code converted to a DLL:
! my_xmean.f90
!
! FUNCTIONS/SUBROUTINES exported from my_function.dll:
! my_function - subroutine
!
subroutine my_xmean(X,N,XMEAN)
! Expose subroutine my_function to users of this DLL
!
!DEC$ ATTRIBUTES DLLEXPORT,C,REFERENCE,ALIAS:'my_xmean_'::my_xmean
! Body of my_function
DOUBLE PRECISION X(N)
XMEAN=0D0
DO J=1,N
2009 Dec 10
1
switch() called with just the EXPR argument causes R to hang (PR#14124)
Dear all,
switch() called with just the EXPR argument causes R to hang so that the
only way to stop it is to kill R.
Reproducible example:
> switch(EXPR="a")
the internal C subroutine behind switch is do_switch located in
R/src/main/builtin.c
For convenience I reproduce it below.
*****************************************************************************
SEXP attribute_hidden
2006 Oct 02
1
CCF and ACF
Dear all,
given two numeric vectors x and y, the ACF(x) at lag k is
cor(x(t),x(t+k)) while the CCF(x,y) at lag k is cor(x(t),y(t-k)). See
below for a simple example.
> set.seed(1)
> x <- rnorm(10)
> y <- rnorm(10)
> x
[1] -0.6264538 0.1836433 -0.8356286 1.5952808 0.3295078 -0.8204684
0.4874291 0.7383247 0.5757814 -0.3053884
> y
[1] 1.51178117 0.38984324
2007 Oct 10
2
corMatrix crashes with corARMA structure (PR#9952)
Full_Name: Benjamin Tyner
Version: 2.6.0 RC 2007-10-01 r43043
OS: WinXP
Submission from: (NULL) (171.161.224.10)
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status RC
major
2009 Aug 12
2
Problem with function in fortran 95
I am writing a function in fortran 95, but the intrinsic function MATMUL is not working properly. Here's an example.
SUBROUTINE mymult(x,y,res,m,n)
IMPLICIT NONE
INTEGER :: m,n
REAL :: x, y, res
DIMENSION :: x(m,n), y(n,m), res(m,m)
res = MATMUL(x,y)
END SUBROUTINE mymult
R CMD SHLIB mat.f95
In R:
dyn.load("mat.so")
x <-
2007 Sep 13
2
Reciprocal Mill's Ratio
I believe that this may be more appropriate here in r-devel than in r-help.
The normal hazard function, or reciprocal Mill's Ratio, may be obtained
in R as dnorm(z)/(1 - pnorm(z)) or, better, as dnorm(z)/pnorm(-z) for
small values of z. The latter formula breaks dowm numerically for me
(running R 2.4.1 under Windows XP 5.1 SP 2) for values of z near 37.4
or greater.
Looking at the pnorm
2009 Dec 29
2
Calling Fortran90 code from R
Dear all,
I am currently trying to create a package wrapping Fortran90 code, the
RRTMG radiative transfer model( http://rtweb.aer.com/rrtm_frame.html).
I am doing this on a Linux workstation, with gcc/gfortran, in case
this matters. The code heavily relies on F90 features, in particular
modules, which seem to clash with R's assumptions for calling compiled
code.
What I have done:
-compiled
2009 Mar 05
1
quantile(), IQR() and median() for factors
Dear all,
from the help page of quantile:
"x ??? numeric vectors whose sample quantiles are wanted. Missing
values are ignored."
from the help page of IQR:
"x ??? a numeric vector."
as a matter of facts it seems that both quantile() and IQR() do not
check for the presence of a numeric input.
See the following:
set.seed(11)
x <- rbinom(n=11,size=2,prob=.5)
x <-