Berend Hasselman bhh at xs4all.nl writes:
Yes. curve expects the function you give it to return a vector if the input
argument is a vector.
This is clearly documented for the argument expr of curve.
Thanks a lot, Berend!
In fact, I didn't read carefully the documentation of curve. Anyway,
Berend Hasselman bhh at xs4all.nl writes:
Your function miBeta returns a scalar when the argument mu is a vector.
Use Vectorize to vectorize it. Like this
VmiBeta - Vectorize(miBeta,vectorize.args=c(mu))
VmiBeta(c(420,440))
and draw the curve with this
See below
On Fri, 12 Apr 2013, Julio Sergio wrote:
Berend Hasselman bhh at xs4all.nl writes:
Your function miBeta returns a scalar when the argument mu is a vector.
Use Vectorize to vectorize it. Like this
VmiBeta - Vectorize(miBeta,vectorize.args=c(mu))
VmiBeta(c(420,440))
and draw
On Apr 12, 2013, at 7:58 AM, Julio Sergio wrote:
Berend Hasselman bhh at xs4all.nl writes:
Your function miBeta returns a scalar when the argument mu is a
vector.
Use Vectorize to vectorize it. Like this
VmiBeta - Vectorize(miBeta,vectorize.args=c(mu))
VmiBeta(c(420,440))
and draw
On 12-04-2013, at 05:15, Julio Sergio julioser...@gmail.com wrote:
I thought the curve function was a very flexible way to draw functions. So I
could plot funtions like the following:
# I created a function to produce functions, for instance:
fp - function(m,b) function(x) sin(x) +
5 matches
Mail list logo