'Regression in R.. predict functions returns more rows that than the test dataset

My test dataset has only around 1200 rows but the predict function is giving way more than 3000 rows. Why is that so?

model_5 <- lm(precip~relative_humidity + dry_bulb_temp_f + wind_speed + station_pressure, data = train_noaa3)

str(predict(model_5, new_data = test_noaa3))

enter image description here

enter image description here



Solution 1:[1]

Question has been solved

use the correct syntax for predict function:

predict(model, newdata = test_data)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Salman Virani