Blog

We provide practical tutorials on data mining, visualization and statistics for decision making.

Version: Français

Prerequisites # Load required R packages library(tidyverse) library(rstatix) library(ggpubr) # Prepare the data and inspect a random sample of the data mydata <- iris %>% filter(Species != "setosa") %>% as_tibble() mydata %>% sample_n(6) ## # A tibble: 6 x 5 ## Sepal.Length Sepal.Width Petal.Length...

How to Perform Multiple T-test in R for Different Variables

Prerequisites # Load required R packages library(tidyverse) library(rstatix) library(ggpubr) # Prepare the data and inspect a random sample of the data mydata <- iris %>% filter(Species != "setosa") %>% as_tibble() mydata %>% sample_n(6) ## # A tibble: 6 x 5 ## Sepal.Length Sepal.Width Petal.Length...

Step 1. Load required packages library(devtools) library(rhub) Step 2. Inspect and choose R-hub platforms to run the check on rhub::platforms() ## debian-clang-devel: ## Debian Linux, R-devel, clang, ISO-8859-15 locale ## debian-gcc-devel: ## Debian Linux, R-devel, GCC ## debian-gcc-devel-nold: ## Debian Linux, R-devel, GCC, no...

How to Run CRAN Checks for a Package on R-hub

Step 1. Load required packages library(devtools) library(rhub) Step 2. Inspect and choose R-hub platforms to run the check on rhub::platforms() ## debian-clang-devel: ## Debian Linux, R-devel, clang, ISO-8859-15 locale ## debian-gcc-devel: ## Debian Linux, R-devel, GCC ## debian-gcc-devel-nold: ## Debian Linux, R-devel, GCC, no...

This article describes how to perform image processing in R using the magick R package, which is binded to ImageMagick library: the most comprehensive open-source image processing library available. The magick R package supports: Many common formats: png, jpeg, tiff, pdf, etc Different manipulations...

Easy Image Processing in R using the Magick Package

This article describes how to perform image processing in R using the magick R package, which is binded to ImageMagick library: the most comprehensive open-source image processing library available. The magick R package supports: Many common formats: png, jpeg, tiff, pdf, etc Different manipulations...

# 1. Load required R packages suppressPackageStartupMessages(library(ggpubr)) suppressPackageStartupMessages(library(rstatix)) # 2. Data preparation df <- ToothGrowth df$dose <- factor(df$dose) # 3. Statistical tests res.stats <- df %>% group_by(dose) %>% t_test(len ~ supp) %>% adjust_pvalue() %>% add_significance() res.stats ## # A tibble: 3 x 11 ##...

How to Create Stacked Bar Plots with Error Bars and P-values

# 1. Load required R packages suppressPackageStartupMessages(library(ggpubr)) suppressPackageStartupMessages(library(rstatix)) # 2. Data preparation df <- ToothGrowth df$dose <- factor(df$dose) # 3. Statistical tests res.stats <- df %>% group_by(dose) %>% t_test(len ~ supp) %>% adjust_pvalue() %>% add_significance() res.stats ## # A tibble: 3 x 11 ##...

This article describes the essentials of R coding style best practices. It’s based on the tidyverse style guide. Google’s current guide is also derived from the tidyverse style guide. Two importants R packages are available to help you in applying the R coding style...

R Coding Style Best Practices

This article describes the essentials of R coding style best practices. It’s based on the tidyverse style guide. Google’s current guide is also derived from the tidyverse style guide. Two importants R packages are available to help you in applying the R coding style...

This article describes how to read and write data from the clipboards using the R package clipr, which works well on Windows, OS X, and Unix-like systems. Note that on Linux, you will need to install the system requirement, either xclip or xsel. This...

How to Easily Read and Write Data from Clipboard in R

This article describes how to read and write data from the clipboards using the R package clipr, which works well on Windows, OS X, and Unix-like systems. Note that on Linux, you will need to install the system requirement, either xclip or xsel. This...

This article describes how to interpret the kappa coefficient, which is used to assess the inter-rater reliability or agreement. In most applications, there is usually more interest in the magnitude of kappa than in the statistical significance of kappa. The following classifications has been...

Kappa Coefficient Interpretation

This article describes how to interpret the kappa coefficient, which is used to assess the inter-rater reliability or agreement. In most applications, there is usually more interest in the magnitude of kappa than in the statistical significance of kappa. The following classifications has been...

Different distance measures are available for clustering analysis. This article describes how to perform clustering in R using correlation as distance metrics. Contents: Prerequisites Demo data Draw heatmaps using pheatmap Draw heatmaps using gplots Summary See also Prerequisites The following R packages will be...

Clustering using Correlation as Distance Measures in R

Different distance measures are available for clustering analysis. This article describes how to perform clustering in R using correlation as distance metrics. Contents: Prerequisites Demo data Draw heatmaps using pheatmap Draw heatmaps using gplots Summary See also Prerequisites The following R packages will be...

This article describes how to extract text from PDF in R using the pdftools package. Contents: Installation Load the package Extract the PDF text content Render the pdf pages as images Summary Installation For MAC OSX and Windows, you can use the following code...

Extract Text from PDF in R

This article describes how to extract text from PDF in R using the pdftools package. Contents: Installation Load the package Extract the PDF text content Render the pdf pages as images Summary Installation For MAC OSX and Windows, you can use the following code...

This article describes how to quickly display summary statistics using the R package skimr. skimr handles different data types and returns a skim_df object which can be included in a tidyverse pipeline or displayed nicely for the human reader. Key features of skimr: Provides...

Display a Beautiful Summary Statistics in R using Skimr Package

This article describes how to quickly display summary statistics using the R package skimr. skimr handles different data types and returns a skim_df object which can be included in a tidyverse pipeline or displayed nicely for the human reader. Key features of skimr: Provides...