「出力」という名前の生ベクトルのリストがあります。そんな感じ:
[1] 58 0a 00 00 00 03 00 04 00 03 00 03 05 00 00 00 00 05 55 54 46 2d 38 00 00 00 fe
[1] 58 0a 00 00 00 03 00 04 00 03 00 03 05 00 00 00 00 05 55 54 46 2d 38 00 01 03 19 00 00 04 02 00 00 00 01 00 04 00 09 00 00 00 04 6d 65 74 61 00 00 02 13 00 00 00 03 00 00 00 10 00 00 00 01 00
[1] ...
それらは異なる長さを持ち、タイプ「生」のものです。
各セルに 1 つのベクトルを持つデータフレームが必要です。
| ID | ベクトル |
|---|---|
| 1 | 58 0a 00 00 00 03 00 04 00 03 00 03 05 00 00 00 00 05 55 54 46 2d 38 00 00 00 フェ |
| 2 | 58 0A 00 00 00 03 00 04 00 03 00 03 05 00 00 00 00 00 00 00 00 00 00 00 05 55 54 46 2D 38 00 00 00 01 00 04 00 09 00 00 00 04 65 74 61 00 00 00 02 13 00 00 00 03 00 00 00 10 00 00 00 01 00 |
私はこれを試しました:
as.data.frame(output)
#Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, :
arguments imply differing number of rows: 27, 3132, 4141, 4267, 3701, 3943, 5200
df <- data.frame(matrix(unlist(output), nrow=length(output)))
#Warning message:
In matrix(unlist(output), nrow = length(output)) :
data length [32954] is not a sub-multiple or multiple of the number of rows [14]
私の問題を解決する方法はありますか?