On 27/10/2015 3:52 PM, David Stevens wrote:
> Sorry to be a late comer to this problem but I'm having a similar
> issue. My function is called by ode from deSolve
>
> ADM1_C <- function(t,state,parameters,...){
>
> with(as.list(c(state,parameters)), {
># do some stuff here and return a list
Sorry to be a late comer to this problem but I'm having a similar
issue. My function is called by ode from deSolve
ADM1_C <- function(t,state,parameters,...){
with(as.list(c(state,parameters)), {
# do some stuff here and return a list containing a vector of
derivatives to ode
...
})
}
in w
Jim's solution works.
Thank you
Carol
On Monday, October 19, 2015 11:53 PM, Jim Lemon
wrote:
I think what you may have done is simply changed x.init= to x=x.init. x.init
may or may not be there when the function is called, and that is what the
warning is saying. While you have sa
What is the class attribute of your (misnamed) x.pt argument? If it does
not inherit from class "func" then your plot.func method will not be used
when you call plot(). You would need to explicitly call plot.func()
instead. If this question/comment makes no sense to you, then you have
some serious
I think what you may have done is simply changed x.init= to x=x.init.
x.init may or may not be there when the function is called, and that is
what the warning is saying. While you have satisfied the restriction that
the first argument must be "x", but then set the default value to something
that R
In effect, this works
but whether I use x or x.init, y or y.init in plot.func, I get
no visible binding for global variable ‘x.init’no visible binding for global
variable ‘y.init’
Regards,
On Monday, October 19, 2015 9:59 PM, Duncan Murdoch
wrote:
On 19/10/2015 3:50 PM, carol white
On 19/10/2015 3:50 PM, carol white wrote:
> Thanks Murdoch.
>
> defining
> plot.func<- function(x=x.init, y=y.init, arg3, arg4, "title", col, arg5)
>
> and if plot doesn't take the exact parameters of plot.func but modified
> of these parameters
> plot(x=x.pt,y=y.pt,xlim = c(0, 10), ylim = c(0,1)
Thanks Murdoch.
defining
plot.func<- function(x=x.init, y=y.init, arg3, arg4, "title", col, arg5)
and if plot doesn't take the exact parameters of plot.func but modified of
these parametersplot(x=x.pt,y=y.pt,xlim = c(0, 10), ylim = c(0,1), xlab=
"xlab", ylab="ylab", main = "title", col = col,type
... (Following up on Duncan)
and see also ?plot and ?plot.default for argument details.
Bert
On Monday, October 19, 2015, Duncan Murdoch
wrote:
> On 19/10/2015 1:29 PM, carol white via R-help wrote:
> > Hi,I have invoked plot in a function (plot.func) as follows but when I
> check the built pac
On 19/10/2015 1:29 PM, carol white via R-help wrote:
> Hi,I have invoked plot in a function (plot.func) as follows but when I check
> the built package, I get a warning:
> plot(x.pt,y.pt,xlim = c(0, 10), ylim = c(0,1), xlab= "xlab", ylab="ylab",
> main = "title", col = col,type = "l")
> R CMD ch
I would guess that x.pt does not have class "func", whatever that is. You
really ought to read the manual section indicated in the error.
---
Jeff NewmillerThe . . Go Live...
DCN:
Have you read the manual as requested?
It will answer your question.
Bert
On Oct 19, 2015 6:31 PM, "carol white via R-help"
wrote:
> Hi,I have invoked plot in a function (plot.func) as follows but when I
> check the built package, I get a warning:
> plot(x.pt,y.pt,xlim = c(0, 10), ylim = c(0,1),
12 matches
Mail list logo