using RDatasets
iris = dataset("datasets","iris") # typeof(iris) => DataFrames.DataFrame
subset=iris[iris[:Species].=="setosa",[:PetalLength,:PetalWidth]]
Notes(1) refer to RDatasets.jl:
In order to load one of the data sets included in the RDatasets
package, you will need to have the DataFrames package installed.
This package is automatically installed as a dependency of the
RDatasets package if you install RDatasets as follows:
Pkg.add("RDatasets")
Note(2): as datasets in RDatasets package are of DataFrame type, so one can use syntax from dataframesjl to create Subsets
EDIT:
As @jverzani commented, using DataFramesMeta unveils a set of macros with SQL semantics that guides users to write query statements in more familiar styles. e.g the above command would be @ix(iris, :Species.=="setosa", [:PetalLength,:PetalWidth])