MergeResults: Merge HybridSchedule and Scores data into a single data...

Description Usage Arguments Value Errors Examples

View source: R/firstapiR_util.R

Description

MergeResults() uses R's merge function to combine the results of the GetHybridSchedule() and GetScores()) functions into a single data frame. While the DetailedScores data frame contains every match detail that gets stored in the field management system, it doesn't list the teams that participated in the match. For each row of scores it only listss the match number and the alliance (red or blue). MergeResults() makes it easy to link detailed match performance data to specific FRC teams.

Usage

1
MergeResults(hybrid.df, scores.df)

Arguments

hybrid.df

A data frame with class HybridSchedule(), obtained from the function GetHybridSchedule. The data frame must be in team shape.

scores.df

A data frame with class Scores, obtained from the function GetScores().

Value

A data frame containing both the teams assigned to a match and their detailed scores. The data frame is in team shape, with six rows per match and one team listed per row. The class is ("Results", "data.frame").

Errors

MergeResults() throws an error if:

Examples

1
2
3
4
sn <- GetSession("username", "key", season = 2016)
hybrid_WAELL_qual <- GetHybridSchedule(sn, event = "WAELL")
scores_WAELL_qual <- GetScores(sn, event = "WAELL")
results_WAELL_qual <- MergeResults(hybrid_WAELL_qual, scores_WAELL_qual)

irwinsnet/firstapiR documentation built on Dec. 22, 2020, 5:13 p.m.