You can read about this using:

dnorm is used to evaluate the densityfunction for som x. The following gives you a plot of the standard normal density

Code:

```
x<-seq(-3,3,0.01)
f<-dnorm(x)
plot(x,f,type="l")
```

qnorm takes p -a probability as argument - and returns a value x such that P(X<x)=p.

pnorm takes an argument x and returns a probability such that P(X<x)=p. Hence pnorm can be understood as the cumulative distribution function F(x) since F(x) = P(X<x)=p. And hence qnorm is the inverse function of F(x).

In all cases R uses the standard normal distribution with mean=0 and standard deviation=1 as default ... use the other argument to change these (see ?pnorm).

If you do not understand this you probably want to read something about continous random variables. It should be written in any book dealing with continous random variables since this is the absolute basics of such variables. You can find some litterature on it simply by googling something like "introduction continuous random variable".

However more important: Understand what Dason writes because he actually reproduces youre "unexpected" result using pnorm noting that the ks.test is parameterspecific. The KS-test dosn't test whether variable is normal simpliciter but rather tests if it is normal with mean=a and sd=b. Using pnorm the mean is as said 0 and sd=1 since R default is the standard normal distribution