As long as all data in TXT files are in the same directory (working directory) script should provide output file "output.txt" generated from tiny data as defined in assignemnt.
Analysis is done by calculating mean on all activity/subject combinations.
Data are first completely joined in one huge table and then part by part is removed and transformation is done to satisfy request with minimum possible dataframe.
Labels are included at the end as caption of each column.