
In this lecture, you will learn how to download the datasets and course files provided in the Udemy Resources section. These files will help you follow the practical examples and run the R code step by step during the course.
Sometimes R packages change over time, so the dataset or script may be updated. If that happens, please download the newest files from the Resources section
In this course, we will keep all analysis inside an R script so you can reproduce the analysis later. That helps students learn good research workflow.
Learn how to import datasets in R from different folders and directories using simple commands.
In this lecture, we set up an RStudio project and organize files to maintain a clean analysis environment.
This lecture introduces the basic workflow for writing and executing R code in RStudio.
In this lecture, we explore the dataset by creating a simple box plot using ggplot to visualize the distribution of values across groups.
This lecture demonstrates how to generate a quick descriptive summary to understand key statistics in the dataset.
Learn how to keep selected variables from a dataset to simplify analysis and focus only on the required information.
Learn how to remove unnecessary variables from a dataset to simplify data management and prepare the data for analysis.
Learn how to keep selected observations in a dataset based on specific conditions to focus the analysis on relevant cases.
Learn how to remove specific observations from a dataset based on conditions to clean the data and prepare it for analysis.
Learn how to create new variables from existing data to prepare the dataset for analysis and modeling.
In this lecture, we prepare the dataset so it can be used effectively for creating box plot visualizations.
This lecture demonstrates how to create a simple box plot to understand the distribution of a continuous variable.
Here we compare distributions across groups by combining a continuous variable with a categorical variable in a box plot.
Learn how to visualize group differences when more than one categorical variable is included in the box plot.
In this lecture, we explore the key elements of a box plot and understand how to interpret them correctly.
This lecture shows how to add titles, axis labels, and other descriptive text to improve plot clarity.
Here we adjust themes and label styles to make the visualization cleaner and more professional.
Learn how to modify legend position and appearance to improve the readability of the plot.
In this lecture, we enhance box plots by applying different color palettes.
This lecture demonstrates how to adjust background elements and overall plot appearance.
Learn how to export box plots so they can be used in reports, presentations, or publications.
In this lecture, we explore how to visualize and compare multiple continuous variables using box plots.
In this lecture, we create a basic histogram to explore the distribution of a continuous variable.
Learn how to modify histogram colors to improve visualization and clarity.
This lecture demonstrates how to display density instead of frequency to better understand data distribution.
Here we add axis labels and titles to make the histogram more informative and readable.
Learn how to adjust themes and background elements to improve the appearance of your histogram.
In this lecture, we overlay a normal distribution curve on the histogram to compare theoretical and observed distributions.
This lecture shows how to create multiple histograms for different groups using a categorical variable.
In this lecture, we create a basic violin plot to visualize the distribution of a continuous variable.
Learn how to modify colors in violin plots to improve visual clarity and presentation.
This lecture demonstrates how to use the fill option to highlight different groups in violin plots.
Here we add axis labels and titles to make the violin plot easier to understand.
Learn how to compare distributions across two categorical variables using violin plots.
In this lecture, we create a simple point plot to visualize values of a continuous variable.
Learn how to display a continuous variable across categories using point plots.
This lecture demonstrates how to compare values across two categorical variables using point plots.
Here we add titles and axis labels to make the point plot easier to interpret.
Learn how to create a scatter plot to explore relationships between two continuous variables.
This lecture shows how to group scatter plots by categories to compare patterns between groups.
Learn how to add a fitted line to a scatter plot to visualize trends between variables.
This lecture introduces bar charts and explains how they can be used to visualize binary variables.
Learn how to visualize a binary variable across categories using a simple bar chart.
This lecture demonstrates how to modify colors and formatting to improve bar chart appearance.
Learn how to compare values across two categorical variables using grouped bar charts.
This lecture focuses on improving layout and formatting when multiple groups are displayed.
Learn how to add 95% confidence intervals to bar charts to better represent statistical uncertainty.
This lecture demonstrates how to visualize multiple binary variables in a single bar chart.
In this lecture, we create a simple bar chart to visualize the frequency of a categorical variable
Learn how to modify colors, labels, and formatting to improve the appearance of bar charts.
This lecture demonstrates how to compare categories using grouped bar charts with two categorical variables
In this lecture, we create a bar chart to compare the mean of a continuous variable across categories.
Learn how to compare mean values across two categorical variables using grouped bar charts.
This lecture demonstrates how to add confidence intervals to bar charts to represent statistical uncertainty
Learn how to visualize and compare multiple continuous variables using mean bar charts.
In this lecture, we prepare continuous variable data so it can be used effectively for heatmap visualization.
Learn how to generate a basic heatmap to visualize relationships among continuous variables.
This lecture demonstrates how to adjust color scales to highlight patterns in heatmap visualizations.
Learn how to refine heatmap formatting and layout to create clearer and more informative visualizations.
Data Visualization and Machine Learning in R for Research and Data Analysis
This course offers a practical and structured approach to data visualization, biostatistical analysis, statistical modeling, and machine learning in R. It is designed for students, researchers, and professionals who want to apply data analysis techniques to real-world datasets.
Using a hands-on, learning-by-doing approach, you will work with real data from the beginning. You will learn how to import data in R and RStudio, explore data structures, and create professional visualizations using ggplot. By the end, you will be able to produce clear, publication-ready figures suitable for reports, theses, and research work.
The course then moves into data management and descriptive analysis. You will learn how to clean datasets, handle missing values, create new variables, and perform exploratory data analysis. These steps build a strong foundation for statistical modeling.
You will perform regression analysis in R, including linear and logistic regression, and learn how to interpret model results correctly. Special emphasis is placed on creating clear statistical summaries and publication-ready tables.
After building a solid statistical base, the course introduces machine learning in R. You will learn key concepts such as train-test split, model evaluation, and overfitting. Practical models such as decision trees and random forests are implemented and compared with traditional regression approaches.
You will also evaluate model performance using confusion matrices and ROC curves, helping you understand when machine learning methods are appropriate.
What you will learn
In this course, you will learn how to create professional data visualizations using ggplot in R and how to clean and manage datasets for analysis. You will perform descriptive and statistical analysis, build and interpret regression models, and generate publication-ready tables. You will also apply machine learning techniques in R and evaluate models using confusion matrix, ROC, and AUC. In addition, you will learn how to compare statistical and predictive modeling approaches in practical research settings.
Who this course is for
This course is designed for students including MPH, MSc, and PhD candidates, as well as public health and research professionals. It is also suitable for data analysts and beginners in data science. Anyone with basic R knowledge who wants to advance their skills in data visualization and machine learning will benefit from this course.
machine learning in R or ML in R
supervised machine learning
unsupervised machine learning
random forest in R
decision tree in R
logistic regression classification
naive bayes in R
support vector machine R
KNN in R
neural network in R
model evaluation
ROC curve AUC