Recovering amounts from factor labels

A legacy system represents three service fees, in dollars, as a factor:


R
fee <- factor(c("300", "100", "300"),
              levels = c("100", "300"))
as.numeric(fee)


Which statement correctly describes the numeric result and gives an expression that recovers all three fee amounts in their original order?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More R Data Types Questions: