factor

Drop unused levels from a factor (usually only needed to clean up a bad import)

income <- factor(income)  # will drop unused levels
 
#this also works
droplevels(income)

Convert factor to numeric

as.numeric(as.character(data$x))

Ordering Factors

dayVals  = unique(week$Day)
dayVals  = dayVals[order(as.numeric(gsub("th","",dayVals)))]
week$Day = factor(week$Day,levels=dayVals)