similar to: Usage of apply function with two matrices

Displaying 20 results from an estimated 2000 matches similar to: "Usage of apply function with two matrices"

2016 May 01
2
Storage of byte code-compiled functions in sysdata.rda
Hi r-devels, we are seeing a new problem with our packages RobAStRDA (just new on CRAN, thanks to Uwe and Kurt!) and RobExtremes (to be submitted). It must be something recent with the way you internally treat/store byte-code compiled functions, as we have no problems with R-3.1.3, but do see an "Error in fct(x) : byte code version mismatch" with R-devel SVNrev r70532. Background:
2006 Dec 10
1
Noncentral t & F distributions
Dear List: The square of the noncentral t-statistic with noncentrality parameter \delta is a noncentral F with noncentrality parameter \lambda=\delta^2. So, t^2_{\nu,\delta} = F_{1,\nu,\lambda=\delta^2}. Consequently, it should follow that t^2_{1-\alpha/2,\nu,\delta} = f_{1-alpha,1,\vu,\lambda=\delta^2}. However, this is not what is happening with the following code. The central
2006 Mar 17
1
Derivative of a splinefun function.
Is there a way of calculating the derivative of a function returned by splinefun()? Such a function is a cubic spline, whence it has a calculable derivative, but is there a (simple) way of getting at it? One workaround that I have thought of is to take a fine grid of points, evaluate the function returned by splinefun() at these points, put an interpolating spline through these points using
2010 Feb 15
1
Non-monotonic spline using splinefun(method = "monoH.FC")
Hi, In my version of R, the stats package splinefun code for fitting a Fritsch and Carlson monotonic spline does not appear to guarantee a monotonic result. If two adjoining sections both have over/undershoot the way the resulting adjustment of alpha and beta is performed can give modified values which still do not satisfy the required constraints. I do not think this is due to finite precision
2008 Oct 06
1
splinefun gives incorrect derivs when extrapolating to the left (PR#13132)
This is a low priority bug that has been around for a while, but I came acr= oss it again while alpha testing 2.8. The resulting function for splinefun gives incorrect deriv values when x is= less than the smallest x-value used to create the function (at least in on= e circumstance), but does the correct thing for x greater than the largest = x-value. Here is an example: > x <- 1:10 >
2007 Nov 14
1
problems with splinefun()
I am working with the function: splinefun() ... When plugging in the variables, I get the function program as if though having only entered '"splinefun". only way to get the values is by spline(xxx,yyy, n=length(xxx)/10, ties = mean)$x and spline(xxx,yyy, n=length(xxx)/10, ties = mean)$y. I'm just wondering if there is something wrong with the package or if I'm doing
2006 Feb 10
1
3-d splinefun
hello, is it possible to do something like splinefun(x,y), but with a 3rd dim? for example, if i have a 2-dim system like: x<-1:100 y<-rexp(100,1) func<-splinefun(x,sort(y)) func(n) # returns interpolated value of y (after sorting) given x=n # i can check this by: plot(x,sort(y)) lines(spline(x,sort(y))) Can i do the same thing with an x,y, and z? i have found the akima
2013 Oct 31
7
[PATCH] tools: ovmf debug build only if tools debug is enabled
Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> --- tools/firmware/ovmf-makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/firmware/ovmf-makefile b/tools/firmware/ovmf-makefile index 073ed44..efb4fb1 100644 --- a/tools/firmware/ovmf-makefile +++ b/tools/firmware/ovmf-makefile @@ -1,3 +1,6 @@ +XEN_ROOT = $(CURDIR)/../../.. +include
2016 May 01
2
Storage of byte code-compiled functions in sysdata.rda
Thanks, Luke, for having a look to it. Sure, I can give you some reproducible example -- even in two degrees of completeness ;-): see below. Thanks again, Peter %----------------------------------- (I) first example %----------------------------------- Just to reproduce the error, on r-devel, try: install.packages("RobAStRDA") require(RobAStRDA) getFromNamespace(".RMXE", ns
2007 Sep 11
1
what am I missing
x<-seq(-1,1,length=10) y<-seq(-1,1,length=10) a<-matrix(c(1,2,2,1),2,2) b<-matrix(c(2,1,1,2),2,2) fv<-function(x,y) { m<-x*a+y*b t<-m[1,1]+m[2,2]; d<-m[1,1]*m[2,2]-m[1,2]^2 return((t-sqrt(t^2-4*d))/2) } gv<-function(x,y) { t<-x*(a[1,1]+a[2,2])+y*(b[1,1]+b[2,2]) d<-(x*a[1,1]+y*b[1,1])*(x*a[2,2]+y*b[2,2])-(x*a[1,2]+y*b[1,2])^2 return((t-sqrt(t^2-4*d))/2) }
2019 Sep 13
1
[PATCH nbdkit] common/bitmap: Don't fail on realloc (ptr, 0)
The following commands: nbdkit -fv --filter=cow memory size=512 --run 'qemu-img info $nbd' nbdkit -fv --filter=cache memory size=512 --run 'qemu-img info $nbd' both fail with: nbdkit: memory[1]: error: realloc: Success Initial git bisect pointed to commit 3166d2bcbfd2 (but I don't believe that commit is the real cause, it merely exposes the bug). The reason this
2019 Sep 05
1
[PATCH] ocaml: Change calls to caml_named_value() to cope with const value* return.
In OCaml >= 4.09 the return value pointer of caml_named_value is declared const. Based on Pino Toscano's original patch to ocaml-augeas. --- common/mlpcre/pcre-c.c | 3 +-- common/mltools/uri-c.c | 6 ++---- common/mlvisit/visit-c.c | 4 +--- generator/daemon.ml | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/common/mlpcre/pcre-c.c b/common/mlpcre/pcre-c.c
2016 Mar 04
2
[fdo] Authenticating/verifying freedesktop projects source
Hi, I would like to recompile a version of ModemManager supporting the Voice interface. That is why I have to use the source code from the master branch and not the 1.4 version. This also requires me to download libqmi from a repository, because 1.12 is too old for this. How do I verify the source? Unfortunately: - nor git commits, nor tags seem to be signed, - HTTPS-accessible source
2011 May 27
1
finding derivative of a data series in R
Dear All, I tried following for getting derivative of a polynomial in R i<- -10:10 x<-i*i*i+3*i*i+2 fun_spline<-splinefun(i,x) plot(x,type="l") lines(x,fx_spline(x, deriv=1), col='green') lines(x,fx_spline(x, deriv=2), col='green') Now when I plot 3*i*i + 6*i and 6*i + 6 the plot was not same for first deivative. where as the 2nd derivative was same Is this a
2011 Feb 04
3
uniroot
Hi, I am using the uniroot function in order to carry out a bivariate Monte Carlo simulation using the logistics model. I have defined the function as: BV.FV <- function(x,y,a,A) (((x^(-a^-1)+y^(-a^-1))^(a-1))*(y^(a-1/a))*(exp(-((1^(-a^-1)+y^(-a^-1))^a)+y^-1)))-A and the procedure is as follows: Randomly generate values of A~(0,1), y0 = -(lnA)^-1 Where: A=Pr{X<xi|Y=yi-1} and a is the
2017 Mar 29
1
[PATCH] mllib: cast integer pointers to intptr_t as intermediate step
This make sure there is no mismatch between the size of the integer value that Int64_val returns, and the size of the guestfs_h pointer. This should fix the warning on 32bit environments (and thus build, when --enable-werror is enabled). --- mllib/visit-c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mllib/visit-c.c b/mllib/visit-c.c index b46dd33..b1c1216 100644 ---
2005 Jul 18
1
read large amount of data
Hi, I have a dataset with 2194651x135, in which all the numbers are 0,1,2, and is bar-delimited. I used the following approach which can handle 100,000 lines: t<-scan('fv', sep='|', nlines=100000) t1<-matrix(t, nrow=135, ncol=100000) t2<-t(t1) t3<-as.data.frame(t2) I changed my plan into using stratified sampling with replacement (col 2 is my class variable: 1 or 2).
2005 Feb 04
2
how to generate a function from a linear model
Hi All, I am trying to generate a function from a linear model. I think there should be build-in function that perform this action but I've had no luck finding it. For example, I have a model created using lm(). model <- lm(sat.d~1+sat.n+I(sat.n^2)) What I would like to have is a function (similar to the one generated by splinefun()) so that I can use it on different data-sets.
2009 Apr 12
2
Performance difference of running Linux in PV or FV mode?
Hey, I have installed Ubuntu 8.10 with FV mode. I use this server for web server (command line mode only, no X window) So should I hack my current installation into a PV mode for production use? In fact, any min. performanc gain suppose I should get? (Any bechmark?) Thanks. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com
2012 Jul 30
2
mgcv 1.7-19, vis.gam(): "invalid 'z' limits'
Hi everyone, I ran a binomial GAM consisting of a tensor product of two continuous variables, a continuous parametric term and crossed random intercepts on a data set with 13,042 rows. When trying to plot the tensor product with vis.gam(), I get the following error message: Error in persp.default(m1, m2, z, col = col, zlim = c(min.z, max.z), xlab = view[1], : invalid 'z' limits In