# Observations of Student-t Distribution with Degrees of Freedom - R

So I'm trying to learn R and using a number of resources including a book called "Discovering Statistics using R" and a bunch of other cool eBooks.

I've also been reading a tutorial page about Student-t Distribution and the wiki of Degree's of Freedom.

How can this be implemented in R? For example, simulating say 500 student-t distribution observations with 5 degrees of freedom?

Although I think I get the concept, I'm unsure of the functions/syntax to achieve this in R.

## Answers

You're looking for the function rt in package stats

From ?rt:

rt(n, df, ncp)