I have a pmf of $X$, which is $X\sim \text{Bin}(n=20, p=0.2)$. I want to figure out how to calculate using `R` $P(X \text{ is even})$. This is what I figured out, by hand you would basically sum all even of $X$. Is the only way in `R` to do this is by summing `dbinom(x=i,size=20,prob=0.2)` where is `i` is an even number in `range(0,20)`? There must be a clever way?