Commit 7b1a76dc by Hopf, Konstantin

### Additional plots for L03 (quantiles)

parent f66e2159
 ... @@ -4,6 +4,7 @@ ... @@ -4,6 +4,7 @@ .RData .RData .Ruserdata .Ruserdata *.html *.html *.Rproj students/ students/ output/ output/ 2018-ws-bia.Rproj 2018-ws-bia.Rproj ... ...
 --- title: "Examples for simple statistics in R (EESYS-BIA-M, L03)" author: "Konstantin Hopf " date: "12 11 2020" output: html_document --- # Plots for quantile computation ```{r cars} p <- c(0, 0.25, 0.5, 0.75, 1) (q <- quantile(c(59, 30, 38, 25, 86, 18, 9, 6), type = 1, probs = p)) plot(stepfun(x=p, y=c(0,q), right = F), main="Percentiles", xlab="Quintiles", ylab="Values", pch=16, do.points=T, col.points="blue",verticals=F) #axis(1, at = 1:5, labels = c(0, 0.25, 0.5, 0.75, 1)) points(x = p, y = q, pch=1) (q <- quantile(c(59, 30, 38, 25, 86, 18, 9, 6, 50), type = 4, probs = p)) plot(stepfun(x=p, y=c(0,q), right = F), main="Percentiles", xlab="Quintiles", ylab="Values", pch=16, do.points=T, col.points="blue",verticals=F) #axis(1, at = 1:5, labels = c(0, 0.25, 0.5, 0.75, 1)) ```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment