[R] D function

Erin Hodgess hodgess at uhddx01.dt.uh.edu
Sat Sep 16 16:21:22 CEST 2000

Dear R People:

Suppose I put in the following:

> w1 <- expression(2*x)
> v1 <- expression(x^2)

and I want to get the derivative of w1 * v1 with respect to x
> D(w1*v1,"x")
Error in w1 * v1 : non-numeric argument to binary operator

Is there a way around this, please?

Thanks in advance!

Erin M. Hodgess, Ph.D.
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
One Main Street 
Houston, TX 77002
e-mail: hodgess at uhddx01.dt.uh.edu

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list