From daece0090a069d74e4aba28d5151f32a19dd680b Mon Sep 17 00:00:00 2001 From: Thomas Manke Date: Fri, 5 Apr 2024 15:34:30 +0200 Subject: [PATCH] 05_DataModel.qmd: save and reset plot params with par() --- qmd/05_DataModels.qmd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qmd/05_DataModels.qmd b/qmd/05_DataModels.qmd index d9478fe..2e15dc3 100644 --- a/qmd/05_DataModels.qmd +++ b/qmd/05_DataModels.qmd @@ -185,8 +185,10 @@ for (f in formula_list) { # more concise loop using lapply/sapply # sig = sapply(lapply(formula_list, lm, data=iris), sigma) +op=par(no.readonly=TRUE) par(mar=c(4,20,2,2)) barplot(sig ~ format(formula_list), horiz=TRUE, las=2, ylab="", xlab="sigma") +par(op) # reset graphical parameters ``` ... more complex models tend to have smaller residual standard error (overfitting?)