Author name: Erik Marsja

PhD in Psychology, Linköping University. Main interest is experimental and cognitive psychology. Enjoy programming in Python and R.

r standardization post

How to Standardize Data in R with scale() & dplyr

This tutorial covers the critical topic of standardizing data in R. Standardizing data involves transforming data such that the mean of the data becomes zero and the standard deviation becomes one. This technique is widely used in data analysis and modeling, including psychology, biology, and finance.
Through this post, you will learn about the circumstances when and why we may want or need to standardize data in R. We will also discuss what it means to standardize variables and which R functions are best suited for standardization. Additionally, the tutorial provides a step-by-step guide on how to standardize data in R. Starting with standardizing a vector, we move on to standardizing a matrix, standardizing data in a dataframe, and finally, standardizing only numeric columns in a dataframe.
Whether you are a seasoned data analyst, a research professional, or a student, this tutorial will equip you with essential skills to standardize data in R. These skills will enable you to understand better and analyze your data, paving the way for better insights and informed decision-making.

How to Standardize Data in R with scale() & dplyr Read More »

Python Scientific Notation & How to Suppress it in Pandas & NumPy

In Python, it is possible to print numbers in scientific notation using base functions and NumPy. Specifically, using three different methods, you will learn how to use Python to print large or small (i.e., floating point) numbers in scientific notation. In the final two sections, before concluding this post, you will also learn how to

Python Scientific Notation & How to Suppress it in Pandas & NumPy Read More »

R violin plot

How to Create a Violin plot in R with ggplot2 and Customize it

This data visualization tutorial will teach us how to make a violin plot in R using ggplot2. We can use several techniques to visualize data (see, for example, the Python-related post “9 Data Visualization Techniques You Should Learn in Python“) to visualize our data in r. Briefly described, violin plots combine a box plot and

How to Create a Violin plot in R with ggplot2 and Customize it Read More »

Scroll to Top