R has many built-in functions to work with probability distributions, with official docs starting at ?Distributions. There are generally four prefixes:
d-The density function for the given distribution
p-The cumulative distribution function
q-Get the quantile associated with the given probabi...