Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は初心者です、助けてくれてありがとう。データを 2 つのグループに分ける R コード。重みが 10 単位以下の観測値のサブセット、および脳の重量が 10 単位を超える観測値。とても簡単に聞こえますが、助けてくれてありがとう。
weigth値がデータフレーム()の列にある場合はdat、次のコマンドを使用できます。
weigth
dat
# subset with weight > 10 units dat[dat$weight > 10, ] # subset with weight <= 10 units dat[dat$weight <= 10, ]
または、2つのデータフレームでリストを生成することもできます。
split(dat, dat$weight > 10)