Both are S4 generic and members of the
Math group generic.

Details

These are internal genericprimitive functions: methods
can be defined for them individually or via the
Math group generic. For complex
arguments (and the default method), z, abs(z) ==
Mod(z) and sqrt(z) == z^0.5.

abs(x) returns an integer vector when x is
integer or logical.

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
The New S Language.
Wadsworth & Brooks/Cole.

See Also

Arithmetic for simple, log for logarithmic,
sin for trigonometric, and Special for
special mathematical functions.

‘plotmath’ for the use of sqrt in plot annotation.

# NOT RUN {require(stats) # for splinerequire(graphics)
xx <- -9:9plot(xx, sqrt(abs(xx)), col = "red")
lines(spline(xx, sqrt(abs(xx)), n=101), col = "pink")
# }