Before you start analyzing, you might want to take a look at your data object’s structure and a few row entries. If it’s a 2-dimensional table of data stored in an R data frame object with rows and ...
Vectors, lists, arrays, matrices and data frames -- a look at five of the most fundamental data structures built into R. Among my colleagues, R is one of the fastest-growing programming languages.
Before you can analyze and visualize data, you have to get that data into R. There are various ways to do this, depending on how your data is formatted and where it’s located. Usually, the function ...
See how to join two data sets by one or more common columns using base R’s merge function, dplyr join functions, and the speedy data.table package. R has a number of quick, elegant ways to join data ...
The table below shows my favorite go-to R packages for data import, wrangling, visualization and analysis — plus a few miscellaneous tasks tossed in. The package names in the table are clickable if ...
R is the perfect language for creating a variety of chi-square tests, which are used to perform statistical analyses of counts of data. Here's how, with some sample code. A chi-square test (also ...
This article is adapted from an edition of our Off the Charts newsletter originally published in October 2021. Off the Charts is a weekly, subscriber-only guide to The Economist’s award-winning data ...