Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to find the weight of the most expensive diamond In R

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 :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading