Press "Enter" to skip to content

Category: R

A Comparison of R GUIs

Bob Muenchen puts together a comparison:

Graphical user interfaces for the R language are easy to use and getting more powerful all the time. Here is my updated comparison of jamovi, JASP, BlueSky Statistics (free & Pro), Rattle, RKWard, R-Instat, R AnalyticFlow, and R Commander.

With so many detailed reviews of Graphical User Interfaces (GUIs) for R available, which should you choose? It’s not too difficult to rate them based on the number of features they offer, so I’ll start there. Then, I’ll follow with a brief overview of each.

Click through for the criteria and results. Bob also has a link to the dataset for your own comparisons. H/T R-Bloggers.

Leave a Comment

Spurious Correlations: The CRAN Package

Mauricio Vargas Sepulveda has released an R package:

The goal of spuriouscorrelations is to keep alive the amazing examples from Tyler Vigen. Unfortunately, as of 2023-10-09, the website is down as my students noticed. Therefore, I decided to use the snapshot from the Internet Wayback Machine to save the datasets from 2023-06-07.

Click through to see how you can re-live those old charts, using the example of “number of people who drowned by falling into a pool” versus “films Nicolas Cage appeared in” on an annual basis. H/T R-Bloggers.

Leave a Comment

GPopt for R

Thierry Moudiki looks at an R port of a Python package:

Keep in mind that this package is for Machine Learning hyperparameter tuning: the global minimum won’t always be found, but this isn’t an issue, since it means you aren’t overfitting the training set.

It’s ported the same way as nnetsauce for R was: with uv to create an isolated Python virtual environment containing the Python GPopt package, and reticulate to call into it from R. Every function in this R package is a thin wrapper that returns the underlying Python object; the general rule is: object accesses with .’s in Python are replaced by $’s in R.

Click through for the instructions and examples of how it works. H/T R-Bloggers.

Leave a Comment

Improving Shiny and RMarkdown Inputs

Thomas Williams is back with more:

In my last post on improving inputs in R Markdown/Shiny, I covered four improvements to quality of life in interactive reports and dashboards. In this blog post I have three more, all approaches I’ve used to add professionalism to self-service R Markdown files.

In yet another plug for R Markdown: most of these techniques can be used in a single *.Rmd file, or can be included in many by putting them in a common CSS or javascript file and linking to it.

Click through to see what you can do.

Leave a Comment

Ways to Impute Missing Data in R

The DataScience+ desk compares methods:

Missing data is the daily reality of medical and epidemiological work: a patient skips a lab draw, a questionnaire item is left blank. So in this tutorial I use real health-survey data and compare three current imputation packages on it: mice (multiple imputation, still the reference method for statistical inference), missRanger (random-forest imputation, the fast successor of missForest), and VIM (k-nearest-neighbour imputation). Before any imputing I use naniar, the modern, ggplot-native toolkit for missing data, to picture where the gaps are. I also include the method most analyses actually use by default, dropping incomplete rows, because seeing why it fails is half the point.

I start from complete records, delete values myself, and check each package against the truth I hid.

Click through for the method and different ways to impute data to fill in the gaps. The text of the article looks AI-generated, though the recommendations end up being pretty solid (at least in my experience with imputation and working with mice).

Leave a Comment

Solving the Jug Problem with Bezout’s Identity

Tomaz Kastrun shifts liquids:

With DFS we can solve this with Bezout’s identity; which in general is a theorem which relates two arbitraty integers with their greatests common divisor; and used in algebraic language, finding common zeros of n-polznomials in n-indeterminates. So the common zeros equals the product of the degrees of the polynomials.

The idea, to refresh your memory, is that you have three jugs of different sizes. Tomaz uses 16L, 11L, and 7L. Using just those, how can you get 8L into each of the two larger jugs? Click through for the answer.

Leave a Comment

TheseusPlot 0.3.0 Released

Koji Makiyama announces an update to an R package:

TheseusPlot is an R package that decomposes differences in a rate metric between two groups into subgroup-level contributions and visualizes the results as a “Theseus Plot”.

For example, when a click-through rate, conversion rate, or retention rate differs between two time periods or groups, TheseusPlot helps answer questions such as: which subgroup contributed most to the difference?

I love the name and I think the plot concept is interesting, especially in the e-commerce context that Koji describes. H/T R-Bloggers.

Comments closed

Snapshot Testing in R

Jakub Sobolewski drills into a particular form of testing:

Snapshot testing is not about screenshots.

Most people meet it through UI regression tests: render a component, save a picture, fail the build when the picture changes. So the technique gets filed away as “the thing that compares images.” That is one use. But not the only one.

The mechanic underneath is general. Capture some output, save it to a file, and on every later run compare fresh output against the saved copy. The output can be a plot. It can also be console text, a log, a data frame, an error message, or a deeply nested list. Anything you can serialize, you can snapshot.

Read on to see how you can perform snapshot testing, using examples in R to demonstrate. H/T R-Bloggers.

Comments closed