Skip to content

This should produce a function with a default value for y of 3. #22

@dtkaplan

Description

@dtkaplan
myf <- makeFun(sqrt(y * pnorm(1 + x^2, mean=2, sd=y)) ~ x & y, y=3)
dx_myf <- D(myf(x, y) ~ x)
dx_myf

But this works:

dx_myf <- D(myf(x, y) ~ x, y=3)
dx_myf

You need to carry over the default values from the original function and impose them on the derivative, unless overridden by a default assigned in the call to D().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions