data(mtcars)
sort_asc(mtcars, "mpg")
sort_asc(mtcars, "cyl", "mpg") # by two column
# same results with column nums
sort_asc(mtcars, 1)
sort_asc(mtcars, 2:1) # by two column
sort_asc(mtcars, 2, 1) # by two column
# 'qc' usage
sort_asc(mtcars, qc(cyl, mpg))
# infix version
mtcars %sort_asc% "mpg"
mtcars %sort_asc% c("cyl", "mpg")
mtcars %sort_asc% qc(cyl, mpg)
Run the code above in your browser using DataLab