Quantcast
Channel: Is there a way that I can solve or stop this error problem in cardinality_threshold? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Jonni for Is there a way that I can solve or stop this error problem in cardinality_threshold?

$
0
0

This error is a built-in stop because the default parameter is set to only allow 15 levels of a variable to be displayed in one graph. You have 24 levels for one of your variables, so you can either adjust the parameter, i.e., the cardinality_threshold, to that value of 24 or set it to NULL. Null may be more generalizable if the value of 24 isn't always the same. But in general, that number of levels depicted at once is going to be discouraged and have these stop-limits.

library(GGally)data(iris)

Create data that has factor of more than 15 levels

iris$group = as.factor(sample(sample(letters,16), 150, replace = TRUE))

Just demonstrating that either entry can work

ggpairs(iris, cardinality_threshold = 16) ggpairs(iris, cardinality_threshold = NULL)

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>