Here is the output I get:
xvals <- seq(from = -4sigma, to = 4sigma, length.out = 100)
ndens <- dnorm(xvals, mean = mu, sd = sigma)
plot(xvals, ndens, type = "l")
*Error in xy.coords(x, y, xlabel, ylabel, log) : *

'x' and 'y' lengths differ*
VaR99 <- qnorm(0.99, mean = mu, sd = sigma)
ES99 <- ESnorm(0.99, mu = mu, sd = sigma)
abline(v = VaR99, col = "red")