Skip to contents

This function orders tours based on their median date, allowing for either ascending or descending chronological order.

Usage

tour_order_by_date(data, ascending = FALSE)

Arguments

data

A data frame in concertData format, containing at least the following columns: - `tour`: The name of the tour. - `date`: The date of each concert in the tour.

ascending

A logical value. If TRUE, tours are ordered from earliest to latest; if FALSE (default), they are ordered from latest to earliest.

Value

A data frame with the following columns: - `tour`: A factor of tour names, ordered chronologically. - `median_date`: The median date of each tour.

Examples

if (FALSE) { # \dontrun{
tour_order <- tour_order_by_date(concert_data)
tour_order_asc <- tour_order_by_date(concert_data, ascending = TRUE)
print(tour_order)
} # }