# NOT RUN {
SASquantile(1:100, .75)
### compare to R-default
quantile(1:100, .75)
### or to what R calls SAS-definition
quantile(1:100, .75, type=3)
# should work for any vector (no seed)
v <- rnorm(50000,20,7)
Q.R2 <- quantile(v, probs=c(.01, .025, .05, .1, .25, .5, .75, .9, .95, .975, .99), type=2)
Q.SAS.R <- SASquantile(v, prob=c(.01, .025, .05, .1, .25, .5, .75, .9, .95, .975, .99), type="R")
Q.SAS.C <- SASquantile(v, prob=c(.01, .025, .05, .1, .25, .5, .75, .9, .95, .975, .99), type="C")
Q.R2
Q.SAS.R
Q.SAS.C
# }
Run the code above in your browser using DataLab