Users want to estimate Petal Length without manual calculations or R knowledge.
# Train linear model on iris dataset
model <- lm(Petal.Length ~ Sepal.Length + Sepal.Width, data = iris)
# Example prediction
newdata <- data.frame(Sepal.Length = 5.1, Sepal.Width = 3.5)
predict(model, newdata)
## 1
## 1.845579