データフレームの行を、行のオブジェクトの配列として返します。fromRows の逆です。{ age: [30, 41], score: [5, 7] } は [{ age: 30, score: 5 }, { age: 41, score: 7 }] になります。欠測値はそのまま残ります (null、または数値の列では NaN)。R の関数ではありません。R はデータをデータフレームで保持するので、行のオブジェクトは必要ありません。
{ age: [30, 41], score: [5, 7] }
[{ age: 30, score: 5 }, { age: 41, score: 7 }]
null
NaN
toRows({ id: ["a", "b"], score: [5, null] }); // [{ id: "a", score: 5 }, { id: "b", score: null }] コピー
toRows({ id: ["a", "b"], score: [5, null] }); // [{ id: "a", score: 5 }, { id: "b", score: null }]
データフレームの行を、行のオブジェクトの配列として返します。fromRows の逆です。
{ age: [30, 41], score: [5, 7] }は[{ age: 30, score: 5 }, { age: 41, score: 7 }]になります。欠測値はそのまま残ります (null、または数値の列ではNaN)。R の関数ではありません。R はデータをデータフレームで保持するので、行のオブジェクトは必要ありません。