In R, is it possible for pbinom to take a noninteger x? I have a homework problem that is asking: "Find the probability that x is within 1 standard deviation of the mean for binomial(n = 20, p = 0.25)".
I found ${\mu} = 5$ and ${\sigma} = 1.94$. So I need to find $P(3.06 < x < 6.94)$. In R, I did pbinom(6.94, 20, .25) - pbinom(3.06, 20, .25) and got 0.561.
How did R compute pbinom when q isn't an integer? I'm confused as to how it's possible to do this when a binomial distribution is discrete.

The function is operating correctly, using the definition of the CDF.  Consider a random variable $X$ with integer support.  For any input $x+r$ with integer part $x$ and remainder $0 \leqslant r < 1$ you should get:
$$F(x+r) \equiv \mathbb{P}(X \leqslant x+r) = \mathbb{P}(X \leqslant x) = F(x).$$
Sure enough, that is exactly what pbinom is doing:
#Check CDF values
identical(pbinom(6.94, 20, .25), pbinom(6, 20, .25))

[1] TRUE

identical(pbinom(3.06, 20, .25), pbinom(3, 20, .25))

[1] TRUE

You can also check that this corresponds to the output of dbinom (to within a small tolerance due to rounding) if you want:
#Check CDF values against PDF values
pbinom(6.94, 20, .25) - sum(dbinom(0:6, 20, .25))

[1] 0

pbinom(3.06, 20, .25) - sum(dbinom(0:3, 20, .25))

[1] 2.775558e-17

