Skip to contents

# Implemented functions

Source: `R/data_plots.R`
`supported_plots.Rd`

Library of supported functions. The list name and "descr" element should be unique for each element on list.

- descr: Plot description

- primary.type: Primary variable data type (continuous, dichotomous or ordinal)

- secondary.type: Secondary variable data type (continuous, dichotomous or ordinal)

- secondary.extra: "none" or NULL to have option to choose none.

- tertiary.type: Tertiary variable data type (continuous, dichotomous or ordinal)

## Usage

    supported_plots()

## Value

list

## Examples

    supported_plots() |> str()
    #> List of 5
    #>  $ plot_hbars  :List of 6
    #>   ..$ descr          : chr "Stacked horizontal bars"
    #>   ..$ note           : chr "A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars"
    #>   ..$ primary.type   : chr [1:2] "dichotomous" "ordinal"
    #>   ..$ secondary.type : chr [1:2] "dichotomous" "ordinal"
    #>   ..$ tertiary.type  : chr [1:2] "dichotomous" "ordinal"
    #>   ..$ secondary.extra: chr "none"
    #>  $ plot_violin :List of 6
    #>   ..$ descr          : chr "Violin plot"
    #>   ..$ note           : chr "A modern alternative to the classic boxplot to visualise data distribution"
    #>   ..$ primary.type   : chr [1:3] "continuous" "dichotomous" "ordinal"
    #>   ..$ secondary.type : chr [1:2] "dichotomous" "ordinal"
    #>   ..$ tertiary.type  : chr [1:2] "dichotomous" "ordinal"
    #>   ..$ secondary.extra: chr "none"
    #>  $ plot_ridge  :List of 6
    #>   ..$ descr          : chr "Ridge plot"
    #>   ..$ note           : chr "An alternative option to visualise data distribution"
    #>   ..$ primary.type   : chr "continuous"
    #>   ..$ secondary.type : chr [1:2] "dichotomous" "ordinal"
    #>   ..$ tertiary.type  : chr [1:2] "dichotomous" "ordinal"
    #>   ..$ secondary.extra: NULL
    #>  $ plot_sankey :List of 6
    #>   ..$ descr          : chr "Sankey plot"
    #>   ..$ note           : chr "A way of visualising change between groups"
    #>   ..$ primary.type   : chr [1:2] "dichotomous" "ordinal"
    #>   ..$ secondary.type : chr [1:2] "dichotomous" "ordinal"
    #>   ..$ tertiary.type  : chr [1:2] "dichotomous" "ordinal"
    #>   ..$ secondary.extra: NULL
    #>  $ plot_scatter:List of 6
    #>   ..$ descr          : chr "Scatter plot"
    #>   ..$ note           : chr "A classic way of showing the association between to variables"
    #>   ..$ primary.type   : chr "continuous"
    #>   ..$ secondary.type : chr [1:2] "continuous" "ordinal"
    #>   ..$ tertiary.type  : chr [1:2] "dichotomous" "ordinal"
    #>   ..$ secondary.extra: NULL