Displaying 4 results from an estimated 4 matches for "stepfunction".
2011 Feb 08
1
help on stepfunction
Dear members,
I would like a help for extracting the values from a step function
(stepfun).
>From help(stepfun) we have the following example:
Y0<-c(1.,2.,4.,3.)
y0<-c(1.,2.,3.,4.)
sfun<-stepfun(1:3,y0,f=0)
plot(sfun)
Now, suppose instead I was given the object (*sfun*, say) from which I
wanted to extract the values generated by the function *stepfun*. More
precisely, I want to
2001 Jan 10
1
optmizing with monotone stepfunctions?
Before re-inventing the wheel I would like to ask: does anyone know about
an optimizer in R which can reliably identify which value of X (Xopt) leads
to Y (Yopt) closest to Ytarget in
Y <- MonotoneStepFun(X)
optionally with the restriction that Yopt <= Ytarget
(at least if any Y <= Ytarget, otherwise any Yopt > Ytarget would be the
preferred answer)
If none is known, I will write
2004 Sep 04
1
Inconsistencies in subassignment (PR#7210)
I have made the 3-d case do the same as the vector case, which is what the
C code clearly intended (a goto label was in the wrong place).
This leaves the bigger question of the right thing to do. I note that data
frames give an error when any indices are NA.
-thomas
On Fri, 3 Sep 2004 ripley@stats.ox.ac.uk wrote:
> Apart from the inconsistencies, there are two clear bugs here:
>
> 1)
2002 Mar 28
3
Vectorizing closest match
If anyone has a very fast vectorized method for doing the following I would appreciate some help. I want to avoid outer() to limit memory problems for very large n.
Let
x = real vector of length n
y = real vector of length n
w = real vector of length m, m typically less than n/2 but can be > n
z = real vector of length m
For w[i], i=1,,,m, find the value of x that is closest to w[i]. In