Q: Reformatting cumulative data I have data with the cumulative households against the cumulative wealth they posses. I've attached an image of a small amount of the data. Using the R diff() function allows me to get what % of households hold what % of wealth which is good.
I aim to find the Gini index of my data which I first need to get in a format where the households are evenly spaced. There are 20000 rows or so meaning I need to standardise the wealth owned to 0.005% at a time or something like that so as to attain a true distribution of wealth with households (1,2, etc) and not the percentage of households.

EDIT:
structure(list(ï..0.002 = c(0.005, 0.007, 0.017, 0.025, 0.027, 
0.037, 0.047, 0.057, 0.067, 0.075, 0.081, 0.09, 0.1, 0.107, 0.116, 
0.124, 0.13, 0.138, 0.145, 0.151), X.0.002 = c(-0.004, -0.005, 
-0.008, -0.01, -0.01, -0.013, -0.015, -0.017, -0.019, -0.02, 
-0.021, -0.022, -0.024, -0.025, -0.026, -0.027, -0.027, -0.028, 
-0.029, -0.03)), row.names = c(NA, 20L), class = "data.frame")


Data OCR'd with https://ocr.space/ :
Obs wealth  households  
1   -0.002  0.002   
2   -0.004  0.005   
3   -0.005  0.007   
4   -0.008  0.017   
5   -0.01   0.025   
6   -0.01   0.027   
7   -0.013  0.037   
8   -0.015  0.047   
9   -0.017  0.057   
10  -0.019  0.067   
11  -0.02   0.075   
12  -0.021  0.081   
13  -0.022  0.09    
14  -0.024  0.1 


A: I suggest you used an interpolation to get your data into an evenly spaced form using the approx function.
interpolation <- approx(x = df$cum_hh, y = df$cum_wealth, xout = seq(0, 1, by = 0.00005))

interpolation$x ## evenly spaced cumulative households
interpolation$y ## interpolated cumulative wealth

