When I run a script in R, there is no error, and everything works.
library(tweedie) data_tweedie <- glm(y ~ ., data = data, family = tweedie(var.power = data_tw$p.max, link.power = 0))
But when I knit the R markdown with the same r section, it gives me an Error
Is it some kind of a bug of the package?
here is a reproducible example
library(tweedie) x <- seq(0,10,1) y <- seq(0,20,2) data <- as.data.frame(y, x) Model <- glm(y ~ x, data = data, family = tweedie(var.power = 1.5, link.power = 0))
When I run it just in console of R studio, there is no problem. But when I include the same exact piece in the R markdown document, it gives an error