I know max(diamonds$price) is the way to find the price of the most expensive one.
I do not know how to find its weight
>Solution :
diamonds$weight[diamonds$price == max(diamonds$price)]
Meaning, extract vector weight from data.frame diamonds, filtering at the rows where price is equal to the max price.