DEP
DEP copied to clipboard
Adding an option to output loadings plot in plot_pca()
Hi,
I've noticed that there was no option to view a loadings plot in the plot_pca()
function, so I have been working on making some minor changes to the code to support this feature:
- A new
loadings
parameter has been added to theplot_pca()
function. - When
loadings = TRUE
, a ggplot object or dataframe will be the output ofplot_pca()
depending on whether theplot
parameter is true or false. - geom_point is not used for the loadings plot; instead,
label=TRUE
regardless of user settings when callingplot_pca()
- Changes have been made to the documentation comments.
- Added a line in to
test_8_plot_functions_explore.R
to ensure thatloadings = TRUE
and `plot = TRUE' returns a ggplot object.