How do I find the critical value of t in R?

You can use the qt() function to find the critical value of t in R. The function gives the critical value of t for the one-tailed test. If you want the critical value of t for a two-tailed test, divide the significance level by two.

Example: Calculating the critical value of t in R
To calculate the critical value of t for a two-tailed test with df = 29 and α = .05:

qt(p = .025, df = 29)