使用如下的数据框,我需要将hex_string
列转换为30列,将它们拆分为4个十六进制字符 - 我为此查看了tidyr
,但是我不知道得到什么这样做了,但更喜欢基于tidyr的解决方案。这些十六进制字符需要在最终输出表中进一步转换为十进制值。
df <- data.frame(
id=c(1,2,3,4),
loc=c("loc1", "loc2", "loc2", "loc3"),
hex_string = c(
"0x005000500050005000400040005000500050005000500050005000500050005000500050005000500050005000500050005000500050005000500050",
"0x004000400040004000400040004000400040004000400040800080008000800080008000800080008000800080008000800080008000800080008000",
"0x01000100010000f000f000f000f000f000f000f000f000f000f000f000f000f00100010000f000f000f000f000f000f000f000f000f000f000f000f0",
"0x800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000"
)
)
答案 0 :(得分:2)
$OIDs