> dd=deriv(y~log(x),"x",func=T)
> dd
function (x)
{
.value <- log(x)
.grad <- array(0, c(length(.value), 1L), list(NULL, c("x")))
.grad[, "x"] <- 1/x
attr(.value, "gradient") <- .grad
.value
}
> dd(2)
[1] 0.6931472
attr(,"gradient")
x
[1,] 0.5
---------
1、我是想获取 "1/x"这个表达式,该如何进行?
2、attr(,"gradient")是什么意思啊?