# get function from namespace instead of possibly getting
# implementation shipped with recent R versions:
bp_.valid_factor = getFromNamespace(".valid.factor", "backports")
bp_.valid_factor(factor(letters[1:3]))
Run the code above in your browser using DataLab