Please...tell me how to deal with data for my purpose!

Hello, I urgently need some help.
This is my data imported by 'fread' function.
What I wanna do is reconstruct dataframe with 'id', 'floorspace summed by each ids', 'land_price averaged by each ids'. Variable 'zone' can be ignored right now.

Thus, I wanna transform this disaggregated data into more aggregated data, with the output whose data objects(=row) only exist 1539(right now there are 3613 rows because each id has several floorspace/land_price data)

I would be very appreciate if you give an advice to this newbie.

This sort of thing can be done with the functions in the dplyr package. If your data frame is named DF -

SummaryByID <- DF |> group_by(id) |> 
                  summarize(Total_floor = sum(floorspace), AvgPrice = mean(land_price))

thank you so much. I solved this problem with your code