I have a dataframe in R which has a long list of company names. I want to select 4 of these companies. They are apple, microsoft, google, amazon. The column name of the company names is "name"
I am creating a subset with subset(companies, name == c("apple", "microsoft", "google", "amazon"))
But this returns 0 rows. Not sure what I am doing wrong.
This however works and returns one row.
subset(companies, name == "apple")