10.2 Need to convert back to a matrix to be able to export the data or manipulate the data

#Convert matrix from data.frame to export into csv file
mean <- as.matrix(summary$table)

#Write.table gives csv output of Summary. Be sure to specify the directory and the output files will be stored there
write.table(mean, file = "Distance.csv", sep =",", row.names = TRUE, col.names = TRUE, qmethod ="double")