A dual object can be either a vector or a matrix. It can contain derivatives
with respect to several variables. The derivatives will have the same shape
as the value.
The shape of an object can be changed using `dim<-`. Note that by default
`as.matrix` and `as.vector` will send back a regular vector/matrix object,
dropping the derivatives. See `salad` to change this behaviour if needed
(this is not the recommended solution).
Many methods and functions have been redefined in the package, in order to
allow to apply existing code to `dual` objects, with no or little change.