R语言中的typeof()和mode()区别浅谈

本文介绍了R语言中typeof()与mode()的功能区别。typeof()返回对象的基本数据类型,而mode()则提供了更多关于对象结构的信息。mode()的输出依赖于typeof(),但两者在某些类型上的表述有所不同。

mode() :常见的有:"logical","integer","double","complex","raw","character","list","expression","name","function"

typyof():大部分也是如此;mode()的输出依赖于typeof();

modes have the same set of names as types except that

●types "integer" and "double" are returned as "numeric".

●types "special" and "builtin" are returned as "function".

●types "symbol" is called mode "name".

●types "language" is returned as "(" or "call".

通过上述帮助文档,我们能直观的看出typeof和mode的区别。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值