Saving factor scores from factor analysis



data_cor <- cor(data)


data_cor_rotated <- fa(r = data_cor, nfactors = 2, fm="pa", rotate="oblimin")

Suppose I wanted to save the 2 factor scores from this factor analysis, in order to carry out data analysis (e.g. descriptive statistics and plots) to evaluate the relationship between these estimated factors and another (composite) variable in the dataset. What would be the Rcode for this?
Thank you


Could you share some reproducible example ? I am not familiar with factor analysis.