问答详情
源自:2-5 R语言基础 factor

table unclass class(unclass) 这几个函数不太懂意思?也不知其作用?


> table(x)

x

  male female 

     2      3 

> unclass(x)

[1] 2 2 1 1 2

attr(,"levels")

[1] "male"   "female"

> class(unclass(x))

[1] "integer"

> ?table

> ?unclass

> ?class(unclass)


提问者:李芬要加油 2019-01-09 16:58

个回答

  • 加油搬砖
    2020-08-12 09:26:32

     ?table ?unclass ?class(unclass)在控制台查找 再操作大概就懂了


  • meteorLiu
    2019-03-11 22:00:30

    table(x)检查列表属性unclass(x)去除列表属性