by Erik Marsja | Oct 16, 2020 | Programming, R

In this R tutorial, you are going to learn how to add a column to a dataframe based on values in other columns. Specifically, you will learn to create a new column using the mutate() function from the package dplyr, along with some other useful functions. Finally, we...
by Erik Marsja | Oct 6, 2020 | Programming, R

In this tutorial, you will learn by examples how to use the %in% in R. Specifically, you will learn 7 different uses of this great operator. Outline Here’s the outline of this post, described a bit more detailed than the table of contents. First, we start out with a...
by Erik Marsja | Oct 2, 2020 | Programming, R

In this brief tutorial, you will learn how to transpose a dataframe or a matrix in R statistical programming environment. Transposing rows and columns is a quite simple task if your data is 2-dimensional (e.g., a matrix or a dataframe). If you have a, for example,...
by Erik Marsja | Sep 30, 2020 | Programming, Python

In this Pandas tutorial, you are going to learn how to count occurrences in a column. There are occasions in data science when you need to know how many times a given value occurs. This can happen when you, for example, have a limited set of possible values that you...
by Erik Marsja | Sep 28, 2020 | Programming, R

In this R tutorial, you will learn how to generate sequences of numbers in R. There are many reasons why we would want to generate sequences of numbers. For example, we may want to generate sequences when plotting the axes of figures or simulating data. Outline...