R Tutorials for Citizen Data Scientists

Excel to Python Example – How to count cells that contain ODD and EVEN numbers

Hits: 20  Excel to Python Example – How to count cells that contain ODD and EVEN numbers   In this Learn by Coding example, we will learn how to count cells that contain odd and even numbers. This example is useful for beginners who has excel background and wish to learn Python programming as well …

Modeling and forecasting population in Bangladesh using ARIMA modelling approach in R

Hits: 63 Modeling and forecasting population in Bangladesh using ARIMA modelling approach in R Employing annual time series data on total population in Bangladesh from 1960 to 2019, we model and forecast total population over the next 20 years using the Box – Jenkins ARIMA technique. This article is presented with the following contents. Contents …

Data Analytics – DISPLAY A BEAUTIFUL SUMMARY STATISTICS IN R USING SKIMR PACKAGE

Hits: 13 DISPLAY A BEAUTIFUL SUMMARY STATISTICS IN R USING SKIMR PACKAGE   This article describes how to quickly display summary statistics using the R package skimr. skimr handles different data types and returns a skim_df object which can be included in a tidyverse pipeline or displayed nicely for the human reader. Key features of skimr: Provides a larger set of …

Data Analytics – HOW TO EASILY MANIPULATE FILES AND DIRECTORIES IN R

Hits: 12 HOW TO EASILY MANIPULATE FILES AND DIRECTORIES IN R   This article presents the fs R package, which provides a cross-platform, uniform interface to file system operations. fs functions are divided into four main categories: path_ for manipulating and constructing paths file_ for files dir_ for directories link_ for links   Contents: Prerequistes Some Key R functions Basic usage Filter …

Data Analytics – GGHIGHLIGHT: EASY WAY TO HIGHLIGHT A GGPLOT IN R

Hits: 25 GGHIGHLIGHT: EASY WAY TO HIGHLIGHT A GGPLOT IN R   This article presents how to easily highlight a ggplot using the gghighlight package. Contents: Prerequisites Line plot Histogram Scatter plot Bar plot   Prerequisites Load required packages and set the default ggplot2 theme to theme_bw(). library(tidyverse) library(gghighlight) theme_set(theme_bw()) Line plot Basic line plot p <- …

Data Analytics – GGANIMATE: HOW TO CREATE PLOTS WITH BEAUTIFUL ANIMATION IN R

Hits: 98 GGANIMATE: HOW TO CREATE PLOTS WITH BEAUTIFUL ANIMATION IN R   This article describes how to create animation in R using the gganimate R package. gganimate is an extension of the ggplot2 package for creating animated ggplots. It provides a range of new functionality that can be added to the plot object in order to …

Data Analytics – EASY CORRELATION MATRIX ANALYSIS IN R

Hits: 57 EASY CORRELATION MATRIX ANALYSIS IN R USING CORRR PACKAGE   This article describes how to easily compute and explore correlation matrix in R using the corrr package. The corrr package makes it easy to ignore the diagonal, focusing on the correlations of certain variables against others, or reordering and visualizing the correlation matrix. It can also compute …

Data Analytics – TOP R COLOR PALETTES TO KNOW FOR GREAT DATA VISUALIZATION

Hits: 303 TOP R COLOR PALETTES TO KNOW FOR GREAT DATA VISUALIZATION   This article presents the top R color palettes for changing the default color of a graph generated using either the ggplot2 package or the R base plot functions. You’ll learn how to use the top 6 predefined color palettes in R, available in different R packages: Viridis color …

Data Analytics – GGPLOT THEME BACKGROUND COLOR AND GRIDS

Hits: 42 GGPLOT THEME BACKGROUND COLOR AND GRIDS   This article shows how to change a ggplot theme background color and grid lines. The default theme of a ggplot2 graph has a grey background color. You can easily and quickly change this to a white background color by using the theme functions, such as theme_bw(), theme_classic(), theme_minimal() or theme_light() (See ggplot2 themes gallery). Another alternative is to …

Data Analytics – GGPLOT THEMES GALLERY

Hits: 63 Data Analytics – GGPLOT THEMES GALLERY   In this R graphics tutorial, we present a gallery of ggplot themes. You’ll learn how to: Change the default ggplot theme by using the list of the standard themes available in ggplot2 R package. Our selection of best ggplot themes for professional publications or presentations, include: theme_classic(), theme_minimal() and theme_bw(). Another famous theme …

Data Analytics – GGPLOT LEGEND TITLE, POSITION AND LABELS

Hits: 91 GGPLOT LEGEND TITLE, POSITION AND LABELS   This R graphics tutorial shows how to customize a ggplot legend. you will learn how to: Change the legend title and text labels Modify the legend position. In the default setting of ggplot2, the legend is placed on the right of the plot. We’ll show examples of …

Data Analytics – GGPLOT LOG SCALE TRANSFORMATION

Hits: 11 GGPLOT LOG SCALE TRANSFORMATION   This article describes how to create a ggplot with a log scale. This can be done easily using the ggplot2 functions scale_x_continuous() and scale_y_continuous(), which make it possible to set log2 or log10 axis scale. An other possibility is the function scale_x_log10() and scale_y_log10(), which transform, respectively, the x and y axis scales into a log …

Data Analytics – GGPLOT AXIS TICKS: SET AND ROTATE TEXT LABELS

Hits: 62 GGPLOT AXIS TICKS: SET AND ROTATE TEXT LABELS   This article describes how to easily set ggplot axis ticks for both x and y axes. We’ll also explain how to rotate axis labels by specifying a rotation angle. In this R graphics tutorial, you will learn how to: Change the font style (size, color and face) of the axis …

Data Analytics – TYPES OF CLUSTERING METHODS: OVERVIEW AND QUICK START R CODE

Hits: 56 TYPES OF CLUSTERING METHODS: OVERVIEW AND QUICK START R CODE   Clustering methods are used to identify groups of similar objects in a multivariate data sets collected from fields such as marketing, bio-medical and geo-spatial. They are different types of clustering methods, including: Partitioning methods Hierarchical clustering Fuzzy clustering Density-based clustering Model-based clustering   In this …