vector (or factor)
(x <- swiss$Education[1:20])
sort(x)
sort(x, partial = c(10, 15))
Partial sorting in R is different with that in Wikipedia.
A detailed introduction on subsetting is seen in Hadley Wickham’s Advanced R.
The three subsetting operators. The six types of subsetting. Important differences in behaviour for different objects (e.g., vectors, lists, factors, matrices, and data frames).
Benjamin on Stack Overflow answered the question 1 of the comparison between subset() and dplyr::filter().
They are, indeed, producing the same result, and they are very similar in concept.
From the point of atmospheric science, NCL has certain natural advantages in dealing with self-described meteorological data formats, but R is improving significantly.
Unformated Binary
I have to say both NCL and R are not as good at reading/writing binary files as Fotran, though technically they are able to do the job.
Self-decribed Binary
NCL uses a single function addfile to handle all format (netCDF, HDF, GRIB, CCM, shapefile), while R requires additional packages.