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

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

$
0
0

I have about 17 soil variables that I'd like to run correlations with elevations, temperature and rainfall against species richness and abundance. I have 39 plots (rows) and the columns contain, environmental variables such as elevation, abundance, species richness, temperature, rainfall and then the list of soil variables (17 columns). Below is my script.

Is there a problem with my script or is it the laptop compatibility of the mac I am using? Please help. Thanks

After running the codes, I am getting this error:

Error in stop_if_high_cardinality(data, columns, cardinality_threshold) :

Column 'pH' has more levels (24) than the threshold (15) allowed.Please remove the column or increase the 'cardinality_threshold' parameter. Increasing the cardinality_threshold may produce long processing times

  GGally::ggpairs(    na.omit(nfi_nontree_soilclim_data[, c(11:18)]),    upper = list(      continuous = wrap(        custom_ggally_cor,        method = "spearman", exact = FALSE,        size = 2.5, col = "black", family = "serif", digits = 2      ), combo = "box_no_facet", discrete = "count", na = "na"    ),    lower = list(      continuous = wrap(        ggally_smooth,        method = "loess", formula = y ~ x,        se = F, lwd = 3, col = "red", shrink = T      ), combo = "facethist", discrete = "facetbar", na = "na"    ),    diag = list(      continuous = wrap(        ggally_densityDiag,        col = "darkgrey", lwd = .1,        stat = "density", fill = "darkgrey"      ), continuous = "densityDiag", na = "naDiag"    ), axisLabels = c("show")  ) + theme_bw() + theme(    text = element_text(family = "serif", size = 4),    axis.text = element_text(family = "serif", size = 4),    panel.grid = element_blank()  )```

Viewing all articles
Browse latest Browse all 2

Trending Articles



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