I would like to know what function or code I would use to combine variables into 1 factor in R-Studio.

For example I have measured six aspects of extraversion and have 6 numbers for each person, but I would like to combine the scores into 1 score for Extraversion.

Thank you for your time