I am trying to create a table using values from an ecdf plot. I\'ve recreated an example below.
#Data data(mtcars) #Sort by mpg mtcars <- mtcars[order(mtcars$mpg),]
A much shorter answer that I can't believe I didn't see earlier. Essentially I just divide the number of rows equal to or less than .25, .5, and .75 by the total number of rows, for each cyl.
cyl.table<-mtcars %>%
group_by(cyl) %>%
summarise("25% Picked" = sum(Percent_Picked<=0.25)/(sum(Percent_Picked<=1)),
"50% Picked" = sum(Percent_Picked<=0.5)/(sum(Percent_Picked<=1)),
"75% Picked" = sum(Percent_Picked<=0.75)/(sum(Percent_Picked<=1)))
cyl.table