'I tried predicting on part of the dataset, but why does it keep predicting on the whole dataset?

So I build a lm model in R on 65OOO rows and I want to see only the predictions for the first ten rows in order to see how good my model predicts. Below you can see the code I wrote to execute this but it keeps predicting the values of all 65000 rows. Is someone able to help me?

test_data <- mydata[1:10,] 
test_data<-subset(test_data,select = -c(24)) #delete column which i try to predict
predict(lm_model109,new=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