Reproducible R tutorials for performing data analysis tasks in the biological/chemical sciences laboratory.

See below my posts or clik on Archive, Tags or Search to look for some topic of your interest. Activate the light/night mode by clicking above on the soon/moon icon ☀️/🌙. If you have any questions or comments about any of the posts on the site, feel free to contact me through my email or social networks (direct links below). Thanks a lot for visit this site! 🤓

Getting fun with ggdogs, ggcats and gganimate

From time to time we all need some fun, so why not make some funny graphs since we are R users, yeah! This post is based on the tutorials on R CHARTS, do not forget to pick a look. Bar dogs First I want to show you how to add some good doggos to an old-fashioned bar chart. If you have not installed ggdogs, run the next code (you need devtools):...

August 4, 2022

Design of Experiments with Mixtures and their Analysis with R

Using R for design and analysis of results for experiments with mixtures. “Mixtures are absolutely everywhere you look. Anything you can combine is a mixture.” (chem4kids.com)  All the code and data in this post are available in the repository: Design of Experiments with Mixtures and their Analysis with R What are experimental designs with mixtures? These are designs aimed at determining the effect of the proportion of different components of a mixture on one or more response variables....

July 1, 2022

Response Surface Designs and their Analysis with R

A basic R tutorial for carrying out the analysis of results of response surface designs. It also discusses how to generate Box-Behnken and Central Composite designs. Any model is only an approximation  All code and data used in this post are available on GitHub: Response Surface Designs and their Analysis with R What is a response surface design? Response surface experimental designs and the analysis of their results are oriented to determine the optimal combination of factors that allow us to obtain the best response within the experimental region....

June 15, 2022

Fractional factorial designs 2^k-p

Some basic concepts about fractional experimental designs, as well as their generation and analysis in R. All other things being equal, the simplest explanation is usually the most likely.  All code and data on this post are available on GitHub: Fractional Designs with R. What are fractional designs? These are designs in which a part or fraction of the treatments of a full factorial design are appropriately chosen, with the objective of determining which of the factors are significant using fewer experimental runs....

March 28, 2022

Data Analysis Reproducibility with R and RStudio

Some ideas related to the reproducibility of data analysis in the life science/chemistry laboratory, as well as a tutorial on how to approach reproducibility analysis with R and RStudio.  Data Analysis Reproducibility This post contains several of my opinions on the topic, and most of the content is of a self-study and of reminder nature. These are things I wish I had known at the beginning of my master’s degree, and later in my PhD, and I have been learning and applying ever so imperfectly....

February 19, 2022

Some Basic Concepts about Design of Experiments and How to Perform their Analysis in R

Basic design of experiments in R for one factor and two factors designs. You can find all the code, data and results in the GitHub repository for this post: Basic design of experiments.  There is no signal without noise It never hurts to go back to basics before tackling more complex things. The purpose of this post is to give a brief overview of the basics of design of experiments, their analysis and how to present results using R and packages like ggplot2 and agricolae....

January 16, 2022

PCA Maker Shiny App

A brief tutorial encompasing the use of PCA Maker, a web application in R made with Shiny.  The purpose of this post is present a brief tutorial about how to install and use PCA Maker. Some concepts about PCA are covered in other posts on this blog, where you can also found useful links about the topic: Principal Component Analysis through Singular Value Decomposition Principal Component Analysis (PCA) from Scratch Principal Component Analysis to Many Responses What is PCA Maker?...

December 29, 2021

Principal Component Analysis through Singular Value Decomposition

How to perform PCA trough singular value decomposition using R.  What is singular value decomposition? Singular value decomposition (SVD) is a factorization of a real or complex matrix which generalizes the eigendecomposition of a square normal matrix with an orthonormal eigenbasis to any m x n matrix: Where M is m x n, U is m x m, S is m x n, and V is n x n....

November 5, 2021

DOE Maker Shiny App

A brief tutorial encompasing the use of DOE Maker, a web application in R made with Shiny.  The purpose of this post is present a brief tutorial about how to install and use DOE Maker, and it does not cover concepts or theoretical aspects about design of experiments. If you do not really know what is the topic about, a good first place could be found in the link: Design of experiments....

October 26, 2021

Principal Component Analysis (PCA) from Scratch

How to perform PCA step by step using R and basic linear algebra functions and operations.  What is PCA? PCA is an exploratory data analysis based in dimensions reduction. The general idea is to reduce the dataset to have fewer dimensions and at the same time preserve as much information as possible. PCA allows us to make visual representations in two dimensions and check for groups or differences in the data related to different states, treatments, etc....

October 14, 2021