Arrange rows in ir
objects by column values
Arguments
- .data
An object of class
ir
.- ...
<
data-masking
> Variables, or functions of variables. Usedesc()
to sort a variable in descending order.- .by_group
If
TRUE
, will sort first by grouping variable. Applies to grouped data frames only.
See also
Other tidyverse:
distinct.ir()
,
extract.ir()
,
filter-joins
,
filter.ir()
,
group_by
,
mutate-joins
,
mutate
,
nest
,
pivot_longer.ir()
,
pivot_wider.ir()
,
rename
,
rowwise.ir()
,
select.ir()
,
separate.ir()
,
separate_rows.ir()
,
slice
,
summarize
,
unite.ir()
Examples
## arrange
dplyr::arrange(ir_sample_data, dplyr::desc(sample_type))
#> # A tibble: 58 × 7
#> id_measurement id_sample sample_type sample_comment klason_lignin
#> * <int> <chr> <chr> <chr> <units>
#> 1 37 SW 11-138 softwood Tsuga heterophyla West… 0.347116
#> 2 38 SW 11-139 softwood Pinus monticola Wester… 0.274905
#> 3 39 SW 11-154 softwood Pinus strobus Eastern … 0.311760
#> 4 40 SW 11-158 softwood Pinus taeda Loblolly p… 0.274715
#> 5 41 SW 11-178 softwood Tsuga caroliniana Caro… 0.345870
#> 6 49 ONP 08-78 old newsprint Australia Paper 0.240786
#> 7 50 ONP 09-388 old newsprint Eleazer 1997 sample 0.238994
#> 8 51 ONP 11-450 old newsprint News and Observer date… 0.163485
#> 9 52 ONP 11-451 old newsprint Houston Chronicle date… 0.240492
#> 10 53 ONP 11-458 old newsprint Indianapolis star 0.288420
#> # … with 48 more rows, and 2 more variables: holocellulose <units>,
#> # spectra <named list>