楼主: dzdyw1102
1700 1

[问答] 有关rapply() [推广有奖]

  • 2关注
  • 0粉丝

已卖:2份资源

本科生

79%

还不是VIP/贵宾

-

威望
0
论坛币
3202 个
通用积分
1.0424
学术水平
0 点
热心指数
2 点
信用等级
0 点
经验
326 点
帖子
68
精华
0
在线时间
147 小时
注册时间
2013-12-20
最后登录
2022-1-7

楼主
dzdyw1102 学生认证  发表于 2014-6-19 12:45:32 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
rapply() 中的参数how = c("unlist", "replace", "list"),list和unlist是分别以列表和非列表的形式输出结果,replace呢?有人知道吗,求指点,R的帮助看不太懂啊
If how = "replace", each element of the list which is not itself a list and has a class included in classes is replaced by the result of applying f to the element.
If the mode is how = "list" or how = "unlist", the list is copied, all non-list elements which have a class included in classes are replaced by the result of applying f to the element and all others are replaced by deflt. Finally, if how = "unlist", unlist(recursive = TRUE) is called on the result.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:apply appl App RAP Recursive elements included replace classes itself

沙发
DM小菜鸟 发表于 2014-12-11 21:33:00
这个函数整体是这样的——
rapply(object, f, classes = "ANY", deflt = NULL, how = c("unlist", "replace", "list"), ...)


如果how = "replace",这本身并不是一个list,
使用了replace之后,f函数就作用于object中每一个元素,
得出的运算结果,取代之前的每个元素。





您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-18 01:43