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でどうやってそれを行うことができますか?
をdata.framexとしx$score、合計スコアの列を とします。パーセンタイルの列を追加できます
x
x$score
x$percentile <- ecdf(x$score)(x$score)
これで、data.framexに追加の column が追加されpercentileました。これが必要です。
percentile