orderfactor: Order factor levels based on another variable

Description Usage Arguments Author(s)

View source: R/functions.R

Description

Create a factor from a factor or character string, with levels ordered based on another variable.

Usage

1

Arguments

var

Factor or character vector with the values of the output factor.

by

A vector that can be ordered with base::order.

Author(s)

Lauri Myllyvirta lauri.myllyvirta@greenpeace.org


laurimyllyvirta/lauR documentation built on April 28, 2021, 6:26 p.m.