DEP icon indicating copy to clipboard operation
DEP copied to clipboard

Adding an option to output loadings plot in plot_pca()

Open gtluu opened this issue 4 years ago • 0 comments

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 the plot_pca() function.
  • When loadings = TRUE, a ggplot object or dataframe will be the output of plot_pca() depending on whether the plot parameter is true or false.
  • geom_point is not used for the loadings plot; instead, label=TRUE regardless of user settings when calling plot_pca()
  • Changes have been made to the documentation comments.
  • Added a line in to test_8_plot_functions_explore.R to ensure that loadings = TRUE and `plot = TRUE' returns a ggplot object.

gtluu avatar Mar 11 '20 19:03 gtluu