Skip to content

problem with cbind

1 message · Liaw, Andy

#
That's because:
[1] 1 2

The underlying representation of a factor, say `x', is to use integers 1
through nlevels(x).  If you do anything that simply convert the factor to
numeric, you just get these codes.

If you create a data frame (instead of simply cbind()ing them together)
you'll retain them as factors.

Andy

From: Ana Patricia Martins