add gear.groups function to within assign.gear.groups.
change typo: gear gear to gear group.
remove the code that runs the function and write.csv.  (running the function is now in assign.gear.group and write.csv is now in frame.)