Skip to content

Commit

Permalink
Ensure 3 CA axes are passed to plot code in screen_topics
Browse files Browse the repository at this point in the history
Necessary to allow 3D plotting
  • Loading branch information
mjwestgate committed Dec 17, 2019
1 parent dd0213d commit 47d7dbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/screen_topics_infrastructure.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ build_plot_data <- function(info, dtm, model, hide_names){
x_df <- cbind(
info,
data.frame(
ade4::dudi.coa(x_matrix, scannf = FALSE, nf=3)$li
ade4::dudi.coa(x_matrix, scannf = FALSE, nf = 3)$li
)
)
x_df$topic <- apply(x_matrix, 1, which.max)
Expand All @@ -110,7 +110,7 @@ build_plot_data <- function(info, dtm, model, hide_names){
# restrict to useful columns
x_df <- x_df[, colnames(x_df) %in% c(
"label", "author", "year", "title", "journal", "pages", "abstract",
"Axis1", "Axis2", "topic", "caption", "common_words")
"Axis1", "Axis2", "Axis3", "topic", "caption", "common_words")
]

# build word plot information (y)
Expand Down

0 comments on commit 47d7dbe

Please sign in to comment.