approx(x, y, xout=<<see below>>, method="linear", n=50, rule=1, f=0)
z <- approx(x,y,newx) # linear interpolation at newx quants <- approx(ppoints(x),sort(x),c(.1,.25,.5,.75,.9))$y # get the 10, 25, 50, 75 and 90 percentiles of x # see also function quantile