The goal of this challenge is to read complex data on wins and losses
for all World Series
games.
We want to to read the data and make a data frame with two
columns:
- year: the year of the series, sorted in chronological order
- pattern: the pattern of wins and losses, for instance
“LWLlwwwW”
Notice that the dataset is organized by columns and so the years
appear in a strange order.
Proceed as follows:
- Mentally think a possible solution, without writing any code
- Ask AI to write code in R for to read the data and to explain the
code
- Read and understand the code. Does the code make sense?
- Try the code. Does it work? If not, ask to debug it