Chi Squared Distribution using R

Hi. How do I calculate P (1<x<4) for a chi squared distribution with degrees of freedom = 3 using R Programming ? What commands in R should I use for specifying the 2 intervals ?
I tried using chisq, pchisq .
I am not sure how to specify the command for continuous intervals.
Any help would be appreciated !!
#compare with the 95% value for the chi-square for 1 deg of freedom
pchisq(3.84, df=1)

#P (1<X<4) = P(X<4) - P(X<1) =
pchisq(4, df=3) - pchisq(1, df=3)
#[1] 0.5397878