unfactor function

Convert factor to numeric without losing information on the label

Convert factor to numeric without losing information on the label

unfactor(f)

Arguments

  • f: A factor

Returns

A numeric vector

Examples

unfactor(factor(c("1","3","3"),levels=c("1","3"))) # contrast this to: as.numeric(factor(c("1","3","3"),levels=c("1","3")))
  • Maintainer: Zhenke Wu
  • License: MIT + file LICENSE
  • Last published: 2024-01-30