Learn R Programming

fitzRoy (version 0.3.3)

convert_results: Convert AFL Men's results into long format

Description

convert_results returns a dataframe containing the results in long format.

Usage

convert_results(results)

Arguments

results

A dataframe that has been returned from get_match_results

Value

A data frame with match results where each row is a team-match combination

Details

The standard results returned by afltables.com will be in wide format. This is useful for game based analysis but less so for team based ones. This function converts the data into long format for easier analysis.

Examples

Run this code
# NOT RUN {
results <- get_match_results()
convert_results(results)
# }

Run the code above in your browser using DataLab