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
Jeff Newmiller jdnewmil at dcn.davis.ca.us writes:
system.time( miBeta( seq( 370, 430, length.out=1e5 ) ) )
user system elapsed
1.300 0.024 1.476
system.time( miBetav( seq( 370, 430, length.out=1e5 ) ) )
user system elapsed
This is very interesting, Jeff. Of course, I
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) + m*x + b
# So I can produce a function like this
ff - fp(-0.08, 0.2)
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) +
7 matches
Mail list logo