Description Usage Arguments Value Errors Examples
View source: R/firstapiR_util.R
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.
1 | MergeResults(hybrid.df, scores.df)
|
hybrid.df |
A data frame with class HybridSchedule(), obtained
from the function |
scores.df |
A data frame with class Scores, obtained from the
function |
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").
MergeResults()
throws an error if:
hybrid.df does not have class HybridSchedule or is not in team shape
scores.df does not have class DetailedScores
hybrid.df or scores.df urls are not valid FIRST API urls
scores.df and hybrid.df seasons, events, or match levels are not equal
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.