I am new to the community and to R and I sincerely ask for your indulgence regarding the level of my question.
I am currently doing trying to do a PCA analysis using R.
The data concerns Swap Rates and I would like to plot the loading factors against the Principal components using the results from the Prcomp
function.
I tried to plot the results of the Prcomp
function directly and to convert the loadings factor table into a data frame before plotting, but neither case worked. I keep getting errors like: (list) object cannot be coerced to type 'double'
or simply graphs that do not reflect what I trying to do.
I attached a screenshot of the structure of the dataframe