If I set order = "anyClass in the ggparcoord() function when the dataset has missing values, the function doesn't work. Below is a MWE.
library(palmerpenguins)
#> Warning: package 'palmerpenguins' was built under R version 4.3.3
library(GGally)
#> Warning: package 'GGally' was built under R version 4.3.3
#> Loading required package: ggplot2
#> Warning: package 'ggplot2' was built under R version 4.3.3
#> Registered S3 method overwritten by 'GGally':
#> method from
#> +.gg ggplot2
penguins %>%
ggparcoord(columns = 3:4, groupColumn = "species", order = "anyClass")
#> Error in model.frame.default(formula = x ~ as.factor(classVar == class.names[i]), : variable lengths differ (found for 'as.factor(classVar == class.names[i])')
It is inherited from the singleClassOrder() function. It has two arguments, classVar, and axisVars. Indices corresponding to classVar are removed, however they are not removed from axisVars.
If I set
order = "anyClass
in theggparcoord()
function when the dataset has missing values, the function doesn't work. Below is a MWE.Created on 2024-04-22 with reprex v2.1.0 `
It is inherited from the
singleClassOrder()
function. It has two arguments,classVar
, andaxisVars
. Indices corresponding toclassVar
are removed, however they are not removed fromaxisVars
.