tabulka <- read.table (file = "population.txt", header = TRUE) x <- tabulka$Year Y <- tabulka$Population Y1 <- Y / 0.3 Y2 <- log (1 + log (1 + log (Y1))) model <- lm (Y2 ~ 1 + x + I(x^2)) model$coefficients xx <- seq (0, 2000, by = 0.1) YY <- 0.3 * exp (exp (exp (8.301576e-3 - 3.886778e-4 * xx + 4.035209e-7 * xx**2) -1) -1) summary (tabulka) plot (c (0, 2000), c (0, 6), type = "n", xlab = "rok", ylab = "populace") points (x, Y, pch = 24, col = 4) lines (xx, YY, col = 2, lwd = 1.5)