Data frame with 0 columns and 150 rows

Why does the following code yield no result?
r iris["Species"=='setosa']
data frame with 0 columns and 150 rows

The following code will produce the desired result for you:

iris[iris$Species == 'setosa',]

The $ sign above will enable you to access the particular column. Moreover, placing a comma above after the condition in format data[condition,] means that R will check and return those rows that satisfy your condition. In other words R is returning the whole row with all cells not just a single cell.