Month: December 2019
Cumulative sum or count in R
Here is how to calculate cumulative sum or count by using R built-in datasets.
How to fill down values in R data frame
There are at least two ways how to fill down values in R data frame columns. The fastest way is to use zoo package function na.locf that is combined with dplyr function mutate. Besides, sometimes in R, it is necessary to replace NA with 0. All of those things in this post.