2

I know you can use relevel to set a value as the reference level of a factor.

I want to do the opposite: given a factor column, how can I retrieve the reference value?

I guess the most trivial way would be to run a regression with lm and see which value is missing from the estimated coefficients.

Is there a method/function for this?


I feel silly asking this, but searching how to retrieve the reference level of a factor results in tons of questions asking how to relevel a factor (such as this one). I couldn't find anything on how to do the opposite, so I apologize in advance in case this is a duplicate!

Arturo Sbr
  • 5,567
  • 4
  • 38
  • 76

0 Answers0