- Daróczi Gergely honlapja - -

12. hét

nottem
df <- data.frame(f = nottem)
str(df)

f2c <- function(x) (x-32)*5/9
df <- data.frame(c =f2c(nottem))
str(df)

df$ho <- 1:12
fit <- lm(df$c ~ df$ho)
fit
plot(1:240, df$c, type = "l")
lines(predict(fit), col="red")

fit <- lm(df$c ~ poly(df$ho, 2))
fit
plot(1:240, df$c, type = "l")
lines(predict(fit), col="red")

decompose(df$c)
plot(decompose(df$c))