R 如何使用as.hexmode宽度
根据R文件:R 如何使用as.hexmode宽度,r,hex,R,Hex,根据R文件: as.hexmode(x) ## S3 method for class 'hexmode' as.character(x, ...) ## S3 method for class 'hexmode' format(x, width = NULL, upper.case = FALSE, ...) ## S3 method for class 'hexmode' print(x, ...) 论据 x对象,用于从类“hexmode”继承的方法 宽度NULL或指定最小字段宽度的
as.hexmode(x)
## S3 method for class 'hexmode'
as.character(x, ...)
## S3 method for class 'hexmode'
format(x, width = NULL, upper.case = FALSE, ...)
## S3 method for class 'hexmode'
print(x, ...)
论据
x对象,用于从类“hexmode”继承的方法
宽度NULL或指定最小字段宽度的正整数
要使用,用前导零填充
如果我调用R 3.02:
> hex <- "5"
> as.hexmode(hex,width=2)
如何正确调用as.hexmode?宽度参数属于
格式
(嗯,格式.hexmode
),而不是作为.hexmode
:
format(as.hexmode(hex), width=2)
format(as.hexmode(hex), width=2)