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.
私はRが初めてで、理解できない比較的単純な問題があります。約 30,000 行と 3 列のデータセットがあります。30 行ごとに 1 つのサンプルですが、サンプルの識別子はありません。個々のサンプルの各行をランク付けしたい (つまり、30 の各サブセットをランク付けする必要があります--1:30、31:60、61:90 などで 30000 まで)。出力を元のデータ テーブルにバインドしたいと思います。このタスクを達成する簡単な方法はありますか? ありがとう!
To separate these rows, add another column:
dataset$rank <- rep(1:1000, each=30)
For anything more detailed, a bit of detail in the question would be in order.