Posts

Showing posts from October, 2023

SOME OF MY FAVORITE R FUNCTIONS.

Image
The functions and packages described below are not limited to the use cases discussed in this post. Some can be found in more than one package and can be applied in more than one way.  I use the iris dataset for the examples. It has 150 rows and 5 columns namely: Sepal.Length, Sepal.Width, Petal.Length, Petal.Width and Species  The pipe operator ( %>%) This function can be found in the dplyr package. It is one of those functions you learn earlier on when you start doing a lot of visualization and deep dive exploratory analyses. I envision it as a funnel to sift your bulk data through till you are left with what you want. While on the same package, there are some functions that are worth mentioning ends_with/starts_with : useful in selecting specific columns to keep based on pattern summarise : In most cases this should return a one row summary and is most useful after grouping data. Example (for the pipe function and the first two complimentary functions) iri...