Before we move into deeper analyses, let us take a moment to examine our battle history data. This will help us better understand the information that we are working with. Display the contents of your battleHistory
variable by entering its name into the R console:
> #display all of our battle history data > battleHistory
As you can see, our dataset is composed of seven columns, each containing valuable information about past battles between the Shu and Wei forces:
Method:
contains the type of battle technique employed. These are headToHead, surround, ambush
, and fire
.Rating:
contains a measure of the Shu army's performance on a scale from 0
to 100
. After each battle, Zhuge Liang rated the Shu army to keep a record of its performance under diverse combat conditions.SuccessfullyExecuted:
contains a yes (Y) or no (N) value indicating whether the battle method was executed successfully.Result:
tells us whether the battle ended in Victory
or Defeat
.ShuSoldiersEngaged:
presents the number of soldiers who engaged in combat for the Shu army during each battle.WeiSoldiersEngaged:
is identical to ShuSoldiersEngaged
, but for the Wei forces.DurationInDays:
indicates how long each battle lasted, in days.Overall, data from 120 battles are included, with each combat method represented 30 times. Now that we are more aware of our data, let us begin analyzing it in more detail.