vector,ceiling,floor 函数

作者: 卞卡727 | 来源:发表于2017-06-15 11:29 被阅读13次

vector(mode=类型,length=长度)
创建向量可创建指定长度的空向量

> x<-vector("integer",8)
> x
[1] 0 0 0 0 0 0 0 0```
ceiling强制五入

ceiling(12.1)
[1] 13```
floor强制去掉小数点

> floor(13.7)
[1] 13```

相关文章

网友评论

    本文标题:vector,ceiling,floor 函数

    本文链接:https://www.haomeiwen.com/subject/mtuyqxtx.html