大きなデータフレームを再形成する際に問題が発生しています。そして、私は過去に再形成の問題を避けることができたのは比較的幸運でした。
現在のデータフレームは次のようになります。
unique_id seq response detailed.name treatment
a N1 123.23 descr. of N1 T1
a N2 231.12 descr. of N2 T1
a N3 231.23 descr. of N3 T1
...
b N1 343.23 descr. of N1 T2
b N2 281.13 descr. of N2 T2
b N3 901.23 descr. of N3 T2
...
そして、私はしたい:
seq detailed.name T1 T2
N1 descr. of N1 123.23 343.23
N2 descr. of N2 231.12 281.13
N3 descr. of N3 231.23 901.23
reshape パッケージを調べましたが、処理因子を個々の列名に変換する方法がわかりません。
ありがとう!
編集:ローカルマシン(4GBデュアルコアiMac 3.06Ghz)でこれを実行しようとしましたが、次のように失敗し続けます:
> d.tmp.2 <- cast(d.tmp, `SEQ_ID` + `GENE_INFO` ~ treatments)
Aggregation requires fun.aggregate: length used as default
R(5751) malloc: *** mmap(size=647168) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
機会があれば、これをより大きなマシンの 1 つで実行してみます。