diff --git a/.Rbuildignore b/.Rbuildignore index 7619097..8f0cdc7 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -19,3 +19,4 @@ ^tests/figs$ ^\.github$ ^README.md$ +^CRAN-SUBMISSION$ diff --git a/.github/workflows/articles.yml b/.github/workflows/articles.yml index b10b9b3..65e0f2b 100644 --- a/.github/workflows/articles.yml +++ b/.github/workflows/articles.yml @@ -26,6 +26,9 @@ jobs: install.packages(c("remotes", "devtools", "tidyverse", "pkgdown")) remotes::install_deps(dependencies = TRUE) devtools::install() + system("git clone https://github.com/erblast/parcats.git") + remotes::install_deps("parcats/", dependencies = TRUE) + devtools::install("parcats/") shell: Rscript {0} - name: Check run: | diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index d9c01d9..7292a0a 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -37,6 +37,9 @@ jobs: remotes::install_deps(dependencies = TRUE) install.packages("tidyverse") install.packages("pkgdown", type = "binary") + system("git clone https://github.com/erblast/parcats.git") + remotes::install_deps("parcats/", dependencies = TRUE) + devtools::install("parcats/") shell: Rscript {0} - name: Install package @@ -46,4 +49,4 @@ jobs: run: | git config --local user.email "actions@github.com" git config --local user.name "GitHub Actions" - Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' + Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, run_dont_run = FALSE)' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 633fb76..0000000 --- a/.travis.yml +++ /dev/null @@ -1,83 +0,0 @@ -# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r - -language: R -R: - - release -sudo: false -cache: packages - -r_packages: - - covr - -matrix: - include: - - r: devel - before_install: - - sudo apt-get update - - sudo apt-get -y install libharfbuzz-dev - - sudo apt-get -y install libfribidi-dev - after_success: - - export PKGDOWN=no - - - r: release - before_install: - - sudo apt-get update - - sudo apt-get -y install libharfbuzz-dev - - sudo apt-get -y install libfribidi-dev - before_script: - - Rscript -e 'install.packages("tidyverse")' - - Rscript -e "devtools::install_deps('.', dependencies = 'suggests')" - script: - - Rscript -e "devtools::check('.', error_on = 'note')" - - Rscript -e "devtools::install('.')" - - Rscript -e 'pkgdown::build_site(run_dont_run = TRUE)' - after_success: - - Rscript -e 'covr::codecov()' - - export PKGDOWN=no - - - r: release - name: tidyr-devel - before_install: - - sudo apt-get update - - sudo apt-get -y install libharfbuzz-dev - - sudo apt-get -y install libfribidi-dev - before_script: Rscript -e "remotes::install_github('tidyverse/tidyr')" - after_success: - - export PKGDOWN=no - - r: release - name: dplyr-devel - before_install: - - sudo apt-get update - - sudo apt-get -y install libharfbuzz-dev - - sudo apt-get -y install libfribidi-dev - before_script: Rscript -e "remotes::install_github('tidyverse/dplyr')" - after_success: - - export PKGDOWN=no - - - r: release - name: parcats-devel - before_install: - - sudo apt-get update - - sudo apt-get -y install libharfbuzz-dev - - sudo apt-get -y install libfribidi-dev - script: - - git clone https://github.com/erblast/parcats.git - - git clone https://github.com/erblast/easyalluvial.git - - Rscript -e "install.packages('spelling')" - - Rscript -e "devtools::install_deps('easyalluvial/', dependencies = 'suggests')" - - Rscript -e "devtools::install_deps('parcats/', dependencies = 'suggests')" - - Rscript -e "devtools::install('easyalluvial/')" - - Rscript -e "devtools::check('easyalluvial/', error_on = 'note')" - - Rscript -e "devtools::check('parcats/', error_on = 'note')" - after_success: - - export PKGDOWN=no - -deploy: - provider: pages - skip_cleanup: true - github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable - keep_history: true - local-dir: docs - on: - branch: master - condition: $PKGDOWN = yes diff --git a/DESCRIPTION b/DESCRIPTION index 1a10259..1271d16 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: easyalluvial Title: Generate Alluvial Plots with a Single Line of Code -Version: 0.3.0 +Version: 0.3.1 Authors@R: person( "Bjoern", "Koneswarakantha", role = c("aut","cre"), email = "datistics@gmail.com", comment = c(ORCID = "0000-0003-4585-7799") ) URL: https://github.com/erblast/easyalluvial/ Description: Alluvial plots are similar to sankey diagrams and visualise categorical data @@ -26,7 +26,6 @@ Suggests: ISLR, nycflights13, vdiffr (>= 0.3.1), - parcats, pkgdown, mlbench, earth, @@ -40,7 +39,7 @@ Suggests: rpart, glmnet, xgboost -RoxygenNote: 7.1.1 +RoxygenNote: 7.2.0 Imports: purrr , tidyr (>= 1.0.0) diff --git a/NEWS.md b/NEWS.md index d7e9758..33798cf 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +# Version 0.3.1 submitted to CRAN 20220704 +- cleanup package dependencies + # Version 0.3.0 submitted to CRAN 20200111 - moved modeling packages and vdiffr from imports to suggests - added parsnip and workflows wrapper @@ -33,7 +36,7 @@ Bug Fixes: - Compatibility with `recipes 0.1.5` - NA values in numerical columns are excepted - correct ggplot2 and ggalluvial versions added as dependencies -- p$data_key does not contain comlumns with empty levels anyomore +- p$data_key does not contain columns with empty levels anymore - better support for numerical variables for alluvial_long() # Version: 0.1.8, submitted to CRAN 20190115 diff --git a/R/alluvial_long.R b/R/alluvial_long.R index c12a846..f6de47b 100644 --- a/R/alluvial_long.R +++ b/R/alluvial_long.R @@ -43,12 +43,11 @@ #' ,\code{\link[easyalluvial]{manip_bin_numerics}} #' @examples #' -#' +#' \dontrun{ #' data = quarterly_flights #' #' alluvial_long( data, key = qu, value = mean_arr_delay, id = tailnum, fill_by = 'last_variable' ) #' -#' \dontrun{ #' # more flow coloring variants ------------------------------------ #' #' alluvial_long( data, key = qu, value = mean_arr_delay, id = tailnum, fill_by = 'first_variable' ) diff --git a/R/alluvial_model_response.R b/R/alluvial_model_response.R index 7921457..895b99b 100644 --- a/R/alluvial_model_response.R +++ b/R/alluvial_model_response.R @@ -1,4 +1,4 @@ - +#' @noRd check_degree = function(degree, imp, df){ if( degree > nrow(imp) ){ @@ -11,12 +11,13 @@ check_degree = function(degree, imp, df){ #' @title check if package is installed #' @param pkg character, package name +#' @param raise_error logical #' @return logical #' @export +#' @rdname check_pkg_installed #' @examples #' check_pkg_installed("easyalluvial") -#' -check_pkg_installed = function(pkg){ +check_pkg_installed = function(pkg, raise_error = TRUE){ is_installed <- try({ suppressPackageStartupMessages(requireNamespace(pkg, quietly = TRUE)) @@ -24,11 +25,11 @@ check_pkg_installed = function(pkg){ msg <- paste("Please install package `", pkg, "`") - if(! is_installed){ + if(! is_installed & raise_error){ stop(msg) } - return(TRUE) + return(is_installed) } #' @title pretty numbers @@ -526,6 +527,7 @@ get_pdp_predictions_seq = function(df, imp, m, degree = 4, bins = 5, .f_predict #'@param parallel logical, Default: TRUE #'@rdname pdp_predictions #'@seealso \code{\link[easyalluvial]{get_pdp_predictions}} +#' @noRd pdp_predictions = function(df, imp, m, degree = 4, bins = 5, .f_predict = predict, parallel = FALSE){ @@ -551,6 +553,9 @@ pdp_predictions = function(df, imp, m, degree = 4, bins = 5, .f_predict = predic return(pred) } + # we add one call to progress to satisfy R CMD check + .f <- progress::progress_bar + progressr::handlers("progress") along <- seq(1, nrow(df)) @@ -963,7 +968,7 @@ alluvial_model_response = function(pred, dspace, imp, degree = 4 #' Analysis and Data Mining 8(4) #' @examples #' -#' if(check_pkg_installed("caret")) { +#' if(check_pkg_installed("caret", raise_error = FALSE)) { #' df = mtcars2[, ! names(mtcars2) %in% 'ids' ] #' #' train = caret::train( disp ~ ., @@ -1068,7 +1073,7 @@ alluvial_model_response_caret = function(train, data_input, degree = 4, bins = 5 #' observation in the training data the displayed variables are set to the #' indicated values. The predict function is called for each modified #' observation and the result is averaged} }. Default: 'median' -#'@param parallel logical, turn on parallel processing for pdp methof. Default: FALSE +#'@param parallel logical, turn on parallel processing for pdp method. Default: FALSE #'@param params_bin_numeric_pred list, additional parameters passed to #' \code{\link[easyalluvial]{manip_bin_numerics}} which is applied to the pred #' parameter. Default: list(bins = 5, center = T, transform = T, scale = T) @@ -1090,7 +1095,7 @@ alluvial_model_response_caret = function(train, data_input, degree = 4, bins = 5 #'@inheritSection get_pdp_predictions Parallel Processing #' @examples #' -#' if(check_pkg_installed("parsnip")) { +#' if(check_pkg_installed("parsnip", raise_error = FALSE)) { #' df = mtcars2[, ! names(mtcars2) %in% 'ids' ] #' #' m = parsnip::rand_forest(mode = "regression") %>% diff --git a/R/alluvial_wide.R b/R/alluvial_wide.R index 993d36a..8fe54c1 100644 --- a/R/alluvial_wide.R +++ b/R/alluvial_wide.R @@ -52,11 +52,10 @@ if(getRversion() >= "2.15.1"){ #' name the order will be the same. If we want to change level order #' independently we have to assign unique level names first. #' @examples -#' alluvial_wide( data = mtcars2, id = ids -#' , max_variables = 5 -#' , fill_by = 'first_variable' ) #'\dontrun{ -#' +#' alluvial_wide( data = mtcars2, id = ids +#' , max_variables = 3 +#' , fill_by = 'first_variable' )#' #' # more coloring variants---------------------- #' alluvial_wide( data = mtcars2, id = ids #' , max_variables = 5 diff --git a/R/plot_marginal_hist.R b/R/plot_marginal_hist.R index cded06b..69e410d 100644 --- a/R/plot_marginal_hist.R +++ b/R/plot_marginal_hist.R @@ -511,8 +511,10 @@ plot_hist_wide = function( var, p, data_input){ #' inferred, Default: NULL } } #'@return gtable #' @examples -#' p = alluvial_wide(mtcars2, max_variables = 4) +#'\dontrun{ +#' p = alluvial_wide(mtcars2, max_variables = 3) #' p_grid = add_marginal_histograms(p, mtcars2) +#'} #'@seealso \code{\link[gridExtra]{arrangeGrob}} #'@rdname add_marginal_histograms #'@export @@ -574,8 +576,10 @@ add_marginal_histograms = function(p, data_input, top = TRUE, keep_labels = FALS #' can be used to pass training predictions for model response alluvials #' @return gtable #' @examples -#' p = alluvial_wide(mtcars2, max_variables = 4) +#'\dontrun{ +#' p = alluvial_wide(mtcars2, max_variables = 3) #' plot_all_hists(p, mtcars2) +#' } #' @seealso \code{\link[gridExtra]{arrangeGrob}} #' @seealso \code{\link[easyalluvial]{add_marginal_histograms}} #' @rdname plot_all_hists diff --git a/_pkgdown.yml b/_pkgdown.yml index a0a2df0..b6a8b82 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -38,6 +38,7 @@ reference: contents: - starts_with("manip_") - tidy_imp + - check_pkg_installed - title: Helper Functions - Plotting desc: ~ contents: diff --git a/cran-comments.md b/cran-comments.md index 2f4f42b..17d0f5b 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,35 +1,12 @@ -# Resubmission 0.3.0 - 3 +# Resubmission after being archived on CRAN -Got one Note from automated CRAN check that tests are too slow. -Overall checktime 12 min > 10 min - -Disabled a few more tests on CRAN - -# Resubmission 0.3.0 - 2 - -Got one Note from automated CRAN check that tests are too slow. -Disabled some none-essential longer running tests for CRAN - -# Resubmission 0.3.0 - 1 - -For some reasons 'caret' did not install on the Windows Server which ran -the automated CRAN checks. - -Since 'caret' is only in Suggests, the examples will now only execute if 'caret' -is installed. - -# Update 0.3.0 - -vdiffr and other packages moved to suggests and usage was made conditional +clean up package dependencies ## Test Environments -* local macOS 10.14.6 R 4.0.3 -* Appveyor x86_64-w64-mingw32/x64 (64-bit) R 4.0.3 -* github actions macos-latest R 4.0.3 -* Rhub Fedora Linux, R-devel, clang, gfortran -* Rhub Ubuntu Linux 16.04 LTS, R-release, GCC --> NOTE -* Rhub Windows Server 2008 R2 SP1, R-devel, 32/64 bit -* WinBuilder R 4.0.3 +* local macOS M1 R 4.2.1 +* Appveyor x86_64-w64-mingw32/x64 (64-bit) R 4.2.1 +* github actions macos-latest R 4.2.1 +* WinBuilder R 4.2.1 * WinBuilder R devel coverage -> 96 % @@ -37,14 +14,12 @@ coverage -> 96 % ## Test Results -No errors or notes except for: -5 Examples with CPU or elapsed time > 5s -This server seem to be a bit slower than the others. -The examples are already pretty minimal and have been around for a while. -I would prefer to keep them and not put them into \dontrun{}. +Maintainer: ‘Bjoern Koneswarakantha ’ + +New submission + +Package was archived on CRAN ## Reverse Dependencies -This package has one reverse dependency 'parcats' -- which is also maintained by me -- all checks are passing \ No newline at end of file +no reverse dependencies \ No newline at end of file diff --git a/inst/WORDLIST b/inst/WORDLIST new file mode 100644 index 0000000..a69b334 --- /dev/null +++ b/inst/WORDLIST @@ -0,0 +1,106 @@ +AppVeyor +BNA +Balci +Bergstrom +Christoph +ClinicoPath +Datsun +EAA +EGMQ +EV +EWR +Greys +HH +Herzberg +Hofmann +Interpretable +LGA +MH +MQ +Organisation +PDPs +PLoS +Parcats +Pclass +RColorBrewer +Rosval +Rosvall +Serdar +SibSp +Sportabout +Springer +Verlag +Visualise +Visualising +Wickham +Yeo +YeoJohnson +al +alluvials +carb +categoric +christophm +colour +coloured +colouring +colours +criss +cyl +darkgrey +dataspace +dest +df +disp +doi +dspace +easyalluvial’ +ebook +et +explorative +fint +flavoured +furrr +ggalluvial +ggalluvial’ +ggplot +github +grey +greys +gtable +https +interpretability +interpretable +io +jamovi +johnson +methof +mtcars +newdata +nycflights +ontime +paralelize +paralelized +parcats +parralel +pdp +pkgdown +pred +qsec +qu +randomForest +recognise +rgb +sam +sankey +ste +tailnum +timepoint +unplotted +vdiffr +vip +visualisation +visualisations +visualise +visualising +wiggeling +yeo diff --git a/man/add_marginal_histograms.Rd b/man/add_marginal_histograms.Rd index 355b1b0..2a992a7 100644 --- a/man/add_marginal_histograms.Rd +++ b/man/add_marginal_histograms.Rd @@ -41,9 +41,11 @@ will add density histograms and frequency plots of original data to alluvial plot } \examples{ -p = alluvial_wide(mtcars2, max_variables = 4) +\dontrun{ +p = alluvial_wide(mtcars2, max_variables = 3) p_grid = add_marginal_histograms(p, mtcars2) } +} \seealso{ \code{\link[gridExtra]{arrangeGrob}} } diff --git a/man/alluvial_long.Rd b/man/alluvial_long.Rd index 2bb4bd8..04cc151 100644 --- a/man/alluvial_long.Rd +++ b/man/alluvial_long.Rd @@ -96,12 +96,11 @@ Plots two variables of a dataframe on an alluvial plot. A third } \examples{ - +\dontrun{ data = quarterly_flights alluvial_long( data, key = qu, value = mean_arr_delay, id = tailnum, fill_by = 'last_variable' ) -\dontrun{ # more flow coloring variants ------------------------------------ alluvial_long( data, key = qu, value = mean_arr_delay, id = tailnum, fill_by = 'first_variable' ) diff --git a/man/alluvial_model_response_caret.Rd b/man/alluvial_model_response_caret.Rd index 458fbab..819af76 100644 --- a/man/alluvial_model_response_caret.Rd +++ b/man/alluvial_model_response_caret.Rd @@ -89,7 +89,7 @@ this model visualisation approach follows the "visualising the model \examples{ -if(check_pkg_installed("caret")) { +if(check_pkg_installed("caret", raise_error = FALSE)) { df = mtcars2[, ! names(mtcars2) \%in\% 'ids' ] train = caret::train( disp ~ ., diff --git a/man/alluvial_model_response_parsnip.Rd b/man/alluvial_model_response_parsnip.Rd index 8156352..65842f4 100644 --- a/man/alluvial_model_response_parsnip.Rd +++ b/man/alluvial_model_response_parsnip.Rd @@ -48,7 +48,7 @@ observation in the training data the displayed variables are set to the indicated values. The predict function is called for each modified observation and the result is averaged} }. Default: 'median'} -\item{parallel}{logical, turn on parallel processing for pdp methof. Default: FALSE} +\item{parallel}{logical, turn on parallel processing for pdp method. Default: FALSE} \item{params_bin_numeric_pred}{list, additional parameters passed to \code{\link[easyalluvial]{manip_bin_numerics}} which is applied to the pred @@ -92,7 +92,7 @@ this model visualisation approach follows the "visualising the model \examples{ -if(check_pkg_installed("parsnip")) { +if(check_pkg_installed("parsnip", raise_error = FALSE)) { df = mtcars2[, ! names(mtcars2) \%in\% 'ids' ] m = parsnip::rand_forest(mode = "regression") \%>\% diff --git a/man/alluvial_wide.Rd b/man/alluvial_wide.Rd index 59c9853..7c3cc4a 100644 --- a/man/alluvial_wide.Rd +++ b/man/alluvial_wide.Rd @@ -86,11 +86,10 @@ Under the hood this function converts the wide format into long independently we have to assign unique level names first. } \examples{ -alluvial_wide( data = mtcars2, id = ids - , max_variables = 5 - , fill_by = 'first_variable' ) \dontrun{ - +alluvial_wide( data = mtcars2, id = ids + , max_variables = 3 + , fill_by = 'first_variable' )#' # more coloring variants---------------------- alluvial_wide( data = mtcars2, id = ids , max_variables = 5 diff --git a/man/check_pkg_installed.Rd b/man/check_pkg_installed.Rd index 406f2e8..dc26628 100644 --- a/man/check_pkg_installed.Rd +++ b/man/check_pkg_installed.Rd @@ -4,10 +4,12 @@ \alias{check_pkg_installed} \title{check if package is installed} \usage{ -check_pkg_installed(pkg) +check_pkg_installed(pkg, raise_error = TRUE) } \arguments{ \item{pkg}{character, package name} + +\item{raise_error}{logical} } \value{ logical @@ -17,5 +19,4 @@ check if package is installed } \examples{ check_pkg_installed("easyalluvial") - } diff --git a/man/pdp_predictions.Rd b/man/pdp_predictions.Rd deleted file mode 100644 index 7a597ea..0000000 --- a/man/pdp_predictions.Rd +++ /dev/null @@ -1,51 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/alluvial_model_response.R -\name{pdp_predictions} -\alias{pdp_predictions} -\title{get predictions compatible with the partial dependence plotting method, -parallel variant is called by get_pdp_predictions()} -\usage{ -pdp_predictions( - df, - imp, - m, - degree = 4, - bins = 5, - .f_predict = predict, - parallel = FALSE -) -} -\arguments{ -\item{df}{dataframe, training data} - -\item{imp}{dataframe, with not more then two columns one of them numeric -containing importance measures and one character or factor column containing -corresponding variable names as found in training data.} - -\item{m}{model object} - -\item{degree}{integer, number of top important variables to select. For -plotting more than 4 will result in two many flows and the alluvial plot -will not be very readable, Default: 4} - -\item{bins}{integer, number of bins for numeric variables, increasing this -number might result in too many flows, Default: 5} - -\item{.f_predict}{corresponding model predict() function. Needs to accept `m` -as the first parameter and use the `newdata` parameter. Supply a wrapper for -predict functions with x-y syntax. For parallel processing the predict -method of object classes will not always get imported correctly to the worker -environment. We can pass the correct predict method via this parameter for -example randomForest:::predict.randomForest. Note that a lot of modeling -packages do not export the predict method explicitly and it can only be found -using :::.} - -\item{parallel}{logical, Default: TRUE} -} -\description{ -get predictions compatible with the partial dependence plotting method, -parallel variant is called by get_pdp_predictions() -} -\seealso{ -\code{\link[easyalluvial]{get_pdp_predictions}} -} diff --git a/man/plot_all_hists.Rd b/man/plot_all_hists.Rd index 8ccc825..4d8ec84 100644 --- a/man/plot_all_hists.Rd +++ b/man/plot_all_hists.Rd @@ -27,9 +27,11 @@ will create gtable with density histograms and frequency plots of all variables of a given alluvial plot. } \examples{ -p = alluvial_wide(mtcars2, max_variables = 4) +\dontrun{ +p = alluvial_wide(mtcars2, max_variables = 3) plot_all_hists(p, mtcars2) } +} \seealso{ \code{\link[gridExtra]{arrangeGrob}} diff --git a/tests/testthat/test_plot_imp.R b/tests/testthat/test_plot_imp.R index 9efc0f5..a3b08fb 100644 --- a/tests/testthat/test_plot_imp.R +++ b/tests/testthat/test_plot_imp.R @@ -3,6 +3,8 @@ context('plot_imp') test_that('plot_imp' ,{ + skip_if_not_installed("caret") + df = mtcars2[, ! names(mtcars2) %in% 'ids' ] set.seed(1) train = caret::train( disp ~ . @@ -21,7 +23,9 @@ test_that('plot_imp' test_that('add_importance_plot' ,{ - + + skip_if_not_installed("caret") + df = mtcars2[, ! names(mtcars2) %in% 'ids' ] train = caret::train( disp ~ . @@ -34,7 +38,9 @@ test_that('add_importance_plot' # we can silence the warning by adjusting bins and labels but we want to # maintain more bins for pred_train - expect_warning(p <- alluvial_model_response_caret(train, df, degree = 4, pred_train = pred_train)) + suppressWarnings({ + p <- alluvial_model_response_caret(train, df, degree = 4, pred_train = pred_train) + }) p_grid = add_marginal_histograms(p, data_input = df, plot = F) diff --git a/tests/testthat/test_plot_marginal_histograms.R b/tests/testthat/test_plot_marginal_histograms.R index b706f61..0490e32 100644 --- a/tests/testthat/test_plot_marginal_histograms.R +++ b/tests/testthat/test_plot_marginal_histograms.R @@ -76,6 +76,11 @@ test_that('plot_hist_as_margins',{ # gtables not yet supported by vdiffr # expect_doppelganger('marg_hist_long_cat-fill', p) +}) + +test_that("plot_hist_margins_model_respons" ,{ + + skip_if_not_installed("caret") # model response numeric ---------------------------------- set.seed(1) @@ -141,6 +146,8 @@ test_that('plot_hist_as_margins',{ test_that('model response marginal hists, extra columns in df',{ + skip_if_not_installed("caret") + set.seed(1) df = select(mtcars2, -ids) train = caret::train( disp ~ mpg + wt + cyl + qsec + carb diff --git a/vignettes/data_exploration.Rmd b/vignettes/data_exploration.Rmd index fa3f415..33b4d1c 100644 --- a/vignettes/data_exploration.Rmd +++ b/vignettes/data_exploration.Rmd @@ -59,7 +59,7 @@ alluvial_wide(data_wide ### Alluvial Plot Organisation -Each group of stacked bars represents a variable while the size of each segment represents how many observations in the dataframe belong to that level machting the segment label. The colored flows between the bar stack represent a group of observations that match the value for each variable indicated by the flow. The thickness of the flow indicates how many observations belong to that group. +Each group of stacked bars represents a variable while the size of each segment represents how many observations in the dataframe belong to that level matching the segment label. The colored flows between the bar stack represent a group of observations that match the value for each variable indicated by the flow. The thickness of the flow indicates how many observations belong to that group. We see that each flow has more or less the same thickness and the statistical information in the plot caption tells us that we have 30 flows in total for 32 observations in the dataframe. Which means that almost each observation is unique in its combination of variable values.