### Main Script ###
#loads the csv file into a dataframe
kickData <-read.csv("Kicks.csv", header=TRUE, stringsAsFactors = FALSE)
#calculates the mean, standard deviation, median, max, min and range
#for the ball filled with air and  the ball filled with helium
airMean <- mean(kickData$Air)
heliumMean <- mean(kickData$Helium)
airSD <- sd(kickData$Air)
heliumSD <- sd(kickData$Helium)
airMedian <- median(kickData$Air)
heliumMedian <- median(kickData$Helium)
airMax <- max(kickData$Air)
heliumMax <- max(kickData$Helium)
airMin <- min(kickData$Air)
heliumMin <- min(kickData$Helium)
airRange <- airMax - airMin
heliumRange <- heliumMax - heliumMin
#creates a new dataframe containing the descriptive statistics calculated above
kickSummary <- data.frame("Air" = c(airMean,
                                    airSD,
                                    airMedian,
                                    airMax,
                                    airMin,
                                    airRange),
                          "Helium" = c(heliumMean,
                                       heliumSD,
                                       heliumMedian,
                                       heliumMax,
                                       heliumMin,
                                       heliumRange))
#Names the rows of the new dataframe
rownames(kickSummary)<-c("Mean",
                         "S.D",
                         "Median",
                         "Max",
                         "Min",
                         "Range")
#runs the shapiro test on the kicks with the air ball
shapiro.test(kickData$Air)
#runs the shapiro test on the kicks with the helium ball
shapiro.test(kickData$Helium)
#creates boxplots for both balls
boxplot(kickData$Air)
boxplot(kickData$Helium)