finding the percentage > x with r Trying to locate the names of countries in my data.frame where the most spoken language is not an official language. My columns data.frame is World. The column country.y is the name column of all the countries. Column isOfficial has data in it that is 't' or 'false' representing that the official language is 'true' or 'false'. Another column is percentage representing what percentage of a language is spoken.  So far this is what I came up with.

subset(World$name.y, World$isOfficial != 't' &amp; World$percentage &gt; 50)
I would try the following R-Code for subsetting:

World[World$isOfficial != 't' &amp; World$percentage &gt; 50, "country.y"]


And in case isOfficial is type logical, I would try this R-code:

World[!(World$isOfficial) &amp; World$percentage &gt; 50, "country.y"]