Dear All:

I have

v = c(xy, xy^2, z)

dotv = sum(v*v)

I hope, I have the following result:

dotv = x^2*y^2 + x^2*y^4 + z^2  (still in variable x, y and z, not
numeric result)

How to make simple script, so that I have: dotv = x^2*y^2 + x^2*y^4 + z^2

Thanks a lot for your help.

Best regards, Rizal

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to