R语言中unlist是干嘛用的?—R-China小编问题(29)

童鞋A:R中unlist是干嘛用的?童鞋B:“Given a list structure x, unlist simplifies it to produce a vector which contains all the atomic components which occur in x.”童鞋A:ok i see. thx还能不能用汉语解释一下,并给出个例子啥的,解释一下?

unlist()函数的作用,就是将list结构的数据,变成非list的数据,即将list数据变成字符串向量或者数字向量的形式。例如require(graphics)# create a plotting structurepts <- list(x=cars[,1], y=cars[,2])ulist(pts)大家可以再举例子说明
温馨提示:答案为网友推荐,仅供参考
第1个回答  2017-07-20
R最大优势,就是可以根据需求操作。应用灵活,但首先需要掌握基础知识。R最大的缺点就是消耗内存比较多。
相似回答