You have two options for including this variable in the regression:
Just use the variable as it is, no dummy variable coding. People do this all the time with 5 point Likert scales. This method assumes that moving from 0 to 1 has the same effect as moving from 1 to 2 and from 2 to 3. You may not want to make this assumption.
Use the
as.factor
function inR
to code the variable into three dummy variables relative to the base case (0). You no longer have to assume that the marginal effect of increasing by one level is constant.
The more levels you have in your ordinal variable, the more option 1 would be preferred over option 2 - at some point you have more dummy variables than you want to deal with and interpret.
I don't think there is a way to "force" an independent variable to be ordinal.