Learn R Programming

nmm (version 0.9)

convert_attr2exp: convert_attr2exp converts symbolic attribute of derivative into expression object.

Description

convert_attr2exp converts symbolic attribute of derivative into expression object.

Usage

convert_attr2exp(obj)

Arguments

obj

Symbolic expression of gradient or hessian

Value

combine expression of derivatives

Examples

Run this code
# NOT RUN {
eq1 <- parse(text="2*(log(sin(x)/log(x)))+x^4*log(x)+cos(y+x)")
tt1 <- deriv(eq1, c("x", "y"), hessian=TRUE)
r1 <- convert_attr2exp(extract_attr_deriv(tt1, "grad"))
r2 <- convert_attr2exp(extract_attr_deriv(tt1, "hessian"))
# }

Run the code above in your browser using DataLab