【发布时间】:2017-04-02 02:22:07
【问题描述】:
我正在尝试将下面显示的十六进制字符向量转换为原始向量,
"58" "0a" "00" "00" "00" "02" "00" "03" "02" "00" "00" "02" "03" "00" "00" "00" "03" "13" "00" "00"
我已经用这个代码试过了,
as.raw(hexvec)
但是,这给了我以下结果,
3a 00 00 00 00 02 00 03 02 00
Warning messages:
1: NAs introduced by coercion
2: out-of-range values treated as 0 in coercion to raw
我想要的是原始类型向量中的相同向量(由序列化函数返回)。谁能帮我解决这个问题?
【问题讨论】:
标签: r casting type-conversion