How does the "plot (qnorm)" command in R work?
qnorm
is a function, so it is very important to look for a function that follows the S3 convention plot.function
. If you read the help, you can see that this function:
Draws a curve corresponding to the function along the interval '[from to]'. "curve" can also display the expression in the variable 'xname', the default is 'x'.
Since you are not specifying a range, further down in the help documentation, it specifies:
What happens when neither '/' to 'nor' xlim 'is specified as x-limits is a complicated story. For "plot ()" and for 'curve (add = FALSE)' the default values ββare (0, 1) . For curve (add = NA) 'and' curve (add = TRUE) 'default values ββare taken from x-limits used for the previous plot. (This differs from R versions prior to 2.14.0.)
(selection is highlighted for selection).
So, your call is the plot(qnorm)
same curve(qnorm, from = 0, to = 1)
for plot.function
.
source to share