I have a column in a data frame that looks like the following:
pscore pscoreblocks
0.18 (.177, 0.187)
0.24 (0.237, 0.246)
0.07 (0.069, 0.079)
I have added the pscoreblocks column by dividing the pscore column into 100 evenly spaced intervals.
dfc$pscoreblocks <- cut_interval(dfc$pscore, n=100)
I want to have a new set of the column with a different number for each of the 100 intervals, how can I do that?
pscore pscoreblocks block_number
0.18 (.177, 0.187) 3
0.24 (0.237, 0.246) 5
0.07 (0.069, 0.079) 1