rank_planets: Rank Planets by specified metric

View source: R/rank_planets.R

rank_planetsR Documentation

Rank Planets by specified metric

Description

Returns a plot showing the top "n" number of Star Wars planets sorted by a specified metric with planet name on the y-axis, and the ranking metric on the x-axis.

Usage

rank_planets(interested = NULL, n = 15)

Arguments

interested

Metric to rank planets on. ("rotation_period", "orbital_period", "diameter", "population", "films")

n

Number of results to plot. (default = 15)

Value

A ggplot with planet name on the y-axis and the ranking metric on the x-axis.

Examples

## Not run: rank_planets(interested = "rotation_period", n = 9),
rank_planets(interested = "population")
## End(Not run)

The0therChad/star.rank documentation built on March 27, 2022, 4:24 p.m.