\begin{Schunk}
\begin{Sinput}
 # matrix style, cols 1, 3, 5
 f2 <- swiss[ , c(1, 3, 5)]
 # By column name (my favorite)
 f3 <- swiss[ , c("Fertility", "Examination", "Catholic")]
 all.equal(f2, f3)
\end{Sinput}
\begin{Soutput}
[1] TRUE
\end{Soutput}
\begin{Sinput}
 head(f2)
\end{Sinput}
\begin{Soutput}
             Fertility Examination Catholic
Courtelary        80.2          15     9.96
Delemont          83.1           6    84.84
Franches-Mnt      92.5           5    93.40
Moutier           85.8          12    33.77
Neuveville        76.9          17     5.16
Porrentruy        76.1           9    90.57
\end{Soutput}
\end{Schunk}
