The current development version (0.4.0.9001+) is available at https://github.com/hneth/riskyr/.
Changes since last release:
- none yet
- New hexagon version of logo.
- Package maintenance:
- Add GitHub action (R-CMD-check standard)
- Update
README
and online documentation
riskyr 0.4.0 was released on CRAN on August 15, 2022.
Changes since last release:
-
Enable sampling when computing
freq
fromprob
(i.e., by description, givenN
and 3 essential probabilities) [2021-03]:- add a
sample
argument tocomp_freq()
,comp_freq_prob()
, andriskyr()
; - add a
sample
argument to 6 key plots:
plot_area()
,plot_bar()
,plot_fnet()
,plot_icons()
,plot_prism()
, andplot_tab()
.
- add a
-
Allow conversions/translations between data and descriptions:
write_popu()
creates population data from a description (ariskyr
scenario);read_popu()
creates a description (ariskyr
scenario) from population data.
-
Add a function for plotting cumulative risk curves:
plot_crisk()
plots curves and auxiliary information for visualizing cumulative risks and risk increments;pal_crisk
provides a corresponding color palette (as a named vector).
- Add
FFTrees_riskyr()
to convertFFTrees
objects into correspondingriskyr
objects.
- Add
main
andsub
arguments to all plots (and deprecate the previoustitle_lbl
argument). - Add
is_matrix()
to verify a 2x2 matrix (as a 2x2 numeric contingency table). - Add
is_integer()
to verify integer values.
- Fix bug in
plot_bar()
that caused incorrect bar labels. - Update URLs in
README.md
and all vignettes to https://riskyr.org/. - Increase options and robustness for labeling frequencies and probabilities in plots.
- Reduce widths of freq boxes in
plot_prism()
to reduce overlaps. - Rename labels in
txt_TF
to avoid confusion, as "True condition" (i.e., X) wasFALSE
(now "absent") for "True negatives" (TN
/cr
cases).
riskyr 0.3.0 was released on CRAN on March\ 23, 2021.
Changes since last release:
- Add
plot_fnet()
for plotting frequency nets (Binder et al., 2020) [2020-12].
-
Change default setting of
mar_notes
in all plotting functions: Usingmar_notes = FALSE
as those details are not needed and can be distracting in visualizations. -
Change default arguments for
plot_area()
andplot_tab()
:
Change default settings fromf_lbl_hd = "abb"
tof_lbl_hd = "nam"
(as this makes more sense for riskyrApp). -
New options for
plot_curve()
:
Plotting probability curves as a function of prevalence does not require any specific prevalence value. Thus, setting theprev
argument to eitherNA
or to a vector of several probabilities is now supported. Setting the newprev_range
argument to a range withinc(0, 1)
allows zooming into more specific ranges ofprev
values (on x-axis). -
New options for
plot_plane()
:
Plotting a probability plane as a function of sensitivity and specificity does not require specifying all values. Thus, setting thesens
andspec
arguments to eitherNA
or to a vector of several probabilities is now supported. Setting the newsens_range
andspec_range
arguments to ranges withinc(0, 1)
allows zooming into more specific ranges ofsens
values (on x-axis) andspec
values (on y-axis). -
New options for
plot_prism()
:
Use the newp_lwd
andp_scale
arguments to allow scaling the widths of probability links by current probability values.
-
In
data
: Remove data filesdf_scenarios.RData
anddf_scenarios.csv
, as they were redundant todf_scenarios.rda
(loaded from\data
). -
Improve
make_cond_lbl()
to allow forNA
or vectors of several values (forprev
,sens
, andspec
). -
Add
is_prob_range()
function to verify a range of two probability values (to check new arguments ofplot_curve()
andplot_plane()
).
-
Using colors of
pal
for fill colors of symbols inplot_icon()
. -
Add more color palettes:
- Add
pal_bwp
(a strict b+w color palette suited for printing purposes) and corresponding special cases to major plotting functions. - Add
pal_unikn
(based on color definitions of the unikn package).
- Add
-
Changes to color palettes:
- Add a background color
pal[["bg"]]
to all palettes and plots (to preempt different system defaults). - Adopt
pal_mod
-- rather thanpal_mbw
-- as default color schemepal
(to highlightcond_true
anddec_pos
cases in default plots).
- Add a background color
-
Add reference to article on theoretical background (Neth et al., 2021).
-
Bug fix in
plot_prism()
: Allow plotting simple trees fornchar(by) == 2
. -
Bug fix in
plot_icons()
: Enforced 2 different symbol types for icon arrays with a binary perspective (by = cd
ordc
orac
).
riskyr 0.2.0 was released on CRAN on January 03, 2019.
Changes since last release:
-
Introduce
riskyrApp
version:
To use selectedriskyr
functions without the need for coding an updated version ofriskyrApp
is available at https://github.com/hneth/riskyrApp/ (R Shiny code) and at https://riskyr.org/ (interactive online version). -
Using
pkgdown
:
Provide package documentation online at https://hneth.github.io/riskyr/ (latest release version) and https://hneth.github.io/riskyr/dev/ (current development version).
-
Retiring obsolete functions:
The plotting functionsplot_fnet()
andplot_tree()
are replaced byplot_prism()
, andplot_mosaic()
is replaced byplot_area()
. This improves functionality (e.g., by providing more consistent options across different plotting functions) and removes dependencies on external packages. -
New
plot_prism()
function:
Show a scenario as double frequency tree (by 3 x 2 perspectives) or a frequency tree (in 3 perspectives) with many additional options; combines and replaces the olderplot_fnet()
andplot_tree()
functions (and removes dependency on the diagram package). -
New
plot_area()
function:
Show a scenario as a mosaic plot of relative proportions (in 3 x 2 x 2 possible versions, with many additional options); replaces the olderplot_mosaic()
function (and removes dependencies on the grid and vcd packages). -
New
plot_tab()
function:
Show a scenario as contingency table of frequencies (with row and column sums, and options for showing probabilities); a variant ofplot_area()
that does not scale area sizes. -
New
plot_bar()
function:
Show scenario frequencies as vertical bars (in various configurations).
-
Create
plot_util.R
collection of graphical utility functions:
Define a newbox
object type and various functions for plotting, labeling, and linking them in graphs (to remove dependencies on and limitations imposed by other packages). -
Update
riskyr()
function:
As an alternative to providing 3 essential frequencies, it is now possible to define a scenario from 4 essential frequencies (and check for consistency with given probabilities).
-
Improve
plot_icons()
function:
Show icons separated into 2 subsets by 3 perspectives (condition, decision, accuracy), using the sameby
argument as the other plotting functions. -
Improve
plot_curve()
andplot_plane()
functions:
Update variable names (to snake_case) and add arguments (e.g.,col_pal
,lbl_txt
mar_notes
, etc.) for consistency with newer plotting functions. -
Add
scale
argument:
The new plotting functions feature ascale
argument that allows scaling the size or areas of boxes either by (exact) probability or by (possibly rounded) frequency. When usingscale = "f"
, the probabilities shown are also re-computed from (possibly rounded) frequencies. -
Improve
plot_fnet()
function:
Change argumentbox.cex
tocex.lbl
to ensure consistency withplot_curves()
andplot_plane()
(and use it to scale arrow labels accordingly). Add a warning when using deprecated argument. -
Improve
plot_mosaic()
function:
Change Booleanvsplit
argument toby = "cd"
vs.by = "dc"
to ensure consistency withplot_fnet()
andplot_tree()
. Add a warning when using deprecated argument. -
Improve
mar_notes
andplot_mar
arguments:
Use consistent plot margins and options for showing margin notes for all plots.
-
Improve
pal
andfreq
arguments:
Use more consistent color and frequency names (e.g.,cond_true
,dec_pos
, anddec_cor
are now names of frequencies and the colors corresponding to these frequencies). -
Improve
freq
object:
Add a 3rd perspective (by accuracy or by correspondence of decision to condition) and corresponding frequency pair ofdec.cor
anddec.err
(i.e.,hi + cr
vs.mi + fa
as the diagonal of 4 SDT cases). This increases the number of frequencies infreq
from 9 to 11. Also added corresponding labels ininit_txt.R
and colors ininit_pal.R
. -
Improve
prob
object:
Include accuracy metrics in probabilities (inprob
and summary functions). -
Improve
pal
andtxt
objects:
Add multiple color palettes and text labeling schemes (see?pal
and?txt
for details).
-
Improve
read_popu()
function:
Read a data framepopu
and interpret is as ariskyr
scenario, allows creating scenarios from raw data. -
Add
comp_accu.R
file:
Compute exact accuracy values (not approximations, when usingcomp_accu_freq
on roundedfreq
values) by using the new functioncomp_accu_prob()
to compute the listaccu
from probabilities. Signal rounding when showing accuracy based on rounded frequencies in plots (whenshow.accu == TRUE
andround == TRUE
).
-
More consistent argument and variable names (using snake_case).
-
Many additions and corrections in documentation, examples, and vignettes.
-
plot_icons()
: Bug fix to also swap symbols in legend when the symbol order is changed manually. -
txt_def
: Simplify some default text labels (e.g., for current population, condition, and decision). -
.onAttach
: Cast dice to display probabilistic (i.e., risk-related) start-up messages.
riskyr 0.1.0 was released on CRAN on February 19, 2018.
References
To cite riskyr in derivations and publications please use:
- Neth, H., Gaisbauer, F., Gradwohl, N., & Gaissmaier, W. (2022).
riskyr: Rendering Risk Literacy more Transparent.
Social Psychology and Decision Sciences, University of Konstanz, Germany. Computer software (R package version 0.4.0, Aug. 15, 2022). Retrieved from https://CRAN.R-project.org/package=riskyr.
The following article provides details on the conceptual and theoretical background:
- Neth, H., Gradwohl, N., Streeb, D., Keim, D.A., & Gaissmaier, W. (2021).
Perspectives on the 2x2 matrix: Solving semantically distinct problems based on a shared structure of binary contingencies.
Frontiers in Psychology, 11, 567817. doi: 10.3389/fpsyg.2020.567817
[NEWS.md
updated on 2024-02-16.]