
Master the foundations of the R programming language, from installing R and RStudio to building scripts, data structures, loops, and data import and export for analysis.
Install and set up R and RStudio, open RStudio and explore settings, create a baseline project with a script, load packages, use base R functions, and save your workspace.
Download R version 3.6.1 from the official site and install R on Windows. Then install RStudio Desktop for Windows and finish the setup.
Launch the RStudio IDE for R, explore the console, source, environment, and files panels, and customize appearance, fonts, and themes to suit your workflow.
Master basic operations in R, including arithmetic, variable assignment with <- and =, printing variables, and removing variables from the workspace while clearing the console.
Explore basic mathematical operations in R for beginners, including addition, subtraction, multiplication, division, exponent, modulus, integer division, and essential functions like log, log10, and sqrt.
Learn to create an RStudio project, organize scripts into a project folder, save and run scripts, and use # comments to document code.
Install and load R packages from CRAN, manage dependencies, and use library or require to access data visualization tools like ggplot2 and the diamonds dataset.
Explore essential built-in R functions, including help, sum, example, and vector creation with c, sequence, and rep, plus data() access and basic statistics like mean, min, and max.
Save and load workspace objects in R by exporting individual objects or the entire workspace to external files, then restore them in a new session.
Review the section's steps: download and install. Create a project, save scripts, load packages with built-in functions; complete the first assignment and preview section 2 data types.
Explore r's numeric types, including integers, doubles, complex numbers, and logical values, then learn string manipulations, regular expressions, and data type conversions across sections.
Explore data structures in R for beginners, focusing on integers. Learn to store an integer with a capital L, assign it to a variable, and check its type and class.
Explore doubles and integers in R, showing how integers are a subset of numeric types, how to write a double, and how is.integer and is.numeric tests reveal type relationships.
Explore complex numbers in R by identifying the real and imaginary parts and applying addition, subtraction, multiplication, division, and conjugation, with i^2 = -1.
learn how to use the logical data type for tests in R, evaluate true and false expressions, and understand reserved true and false values like t and f.
Explore strings in R for beginners, using double or single quotes to create and manipulate text, including empty strings, and learn that numbers convert to strings while strings do not.
Master string manipulation in R by printing, concatenating, and collapsing vectors with paste, collapse, and sep. Explore casefold, upper, lower, and translate with chartr, and also substring.
Explore regular expressions and their use in searching and replacing strings, including basics like concatenation, grouping, repetition, meta characters and character classes, with practical R examples.
Learn to use regular expressions in R to match and replace text, extract country names, and handle metacharacters; apply grep, and string operations like sub, gsub, and string split.
Explore special R values like NA, NaN, and Inf, learn how they affect arithmetic and tests (is.na, is.nan), and master data type conversion between numeric, logical, and character in R.
Master the section on integers, numeric types, strings, and data type conversions, then tackle assignment 2 with four tasks on calculations, complex numbers, strings, and regular expressions.
This walk-through of assignment 2 in R for beginners covers variable setup, arithmetic and complex numbers, boolean logic, string manipulation with paste and case conversion, and regex-based state extraction.
Explore vectors, matrices with named rows and columns, and multidimensional arrays, then learn lists and other data types in section 3 of R for beginners.
Explore vectors in R for beginners: understand atomic vectors and data types, create and name vectors, index and modify elements, transpose and combine, apply recycling rules, perform union, intersection, difference.
Explore the vector hierarchy in R, build logical, integer, numeric, and character vectors, name and access elements, modify by index or condition, and learn vector binding.
Explore matrices in R for beginners, including creating, binding, indexing, and modifying two-dimensional data, then perform element-wise and matrix multiplication, transposition, and basic operations.
Create and manipulate matrices in R from vectors, control by row or column, set dimensions and names, and bind matrices by rows or columns, including row sums and apply.
Learn how to create and manipulate multidimensional arrays in R, including naming dimensions, indexing with rows and columns and the third dimension, slicing across dimensions, and applying aggregation.
Create and manipulate arrays in R with array and binding vectors, forming 2d, 3d, and higher dimensional arrays. Access, slice, and modify elements, assign dimnames, and apply functions across margins.
Explore how lists in R store heterogeneous data types, create and name elements with list and names, and access items with single or double brackets.
Demonstrate creating and manipulating lists in R, naming elements, accessing with single and double brackets, updating values, and handling nested structures alongside vectors, matrices, and data frames.
Explore vectors, matrices, arrays, and lists in r for beginners through assignments that cover creating and splitting a 1–100 vector, and performing matrix and list operations.
Explore R basics through an assignment walkthrough, creating and manipulating vectors and sequences, performing vectorized operations, splitting into matrices, solving linear equations, and building nested lists.
Explore the section on data structures in R for beginners, covering factors, date and time objects, and data frames, then learn to import and export data from Excel or CSV.
Learn to use factors in R to store categorical data, create and print factors with their values and levels, and manage ordering and levels.
Explore creating and manipulating factors in R, including custom levels and ordering, converting strings to factors, and handling unknown values with NA in a gender example.
Master handling dates and times in R by learning date and date-time objects, creating dates with format strings, computing differences, generating sequences, and working with epoch time and time zones.
Explore creating and manipulating date and time objects in R, including current date and time, formatting options, date differences, time zones, and generating date sequences for events.
Discover how data frames in R store heterogeneous data as two-dimensional tables of equal-length vectors, created from external sources or matrices, and accessed, subsetted, and modified.
Explore creating and manipulating data frames in R—from vectors and matrices to as.data.frame conversions—plus subsetting, indexing, merging, and basic summaries for numeric and factor columns.
Import data from a file into R using read.table and read.csv. Adopt a Swiss Army knife approach for data import, using haven for SPSS and json, plus web sources.
Explore importing data from text, csv, and excel files, including specific sheets like cars and eruptions; import JSON, SPSS, SAS, and SQLite database tables using relevant R packages and functions.
Export data from your workspace to multiple file formats, including text, Excel, JSON, and relational databases or flat files, using R export tools and wrappers.
Learn to export data frames in R to semicolon or tab separated text, csv, excel, json, spss, and stata formats, including writing to tables and managing connections.
Import four yearly crypto price files, merge into one data frame, and compute mean, min, max, and median prices before exporting results by coin.
Walk through assignment 4 in R for beginners: import and merge data, convert dates, order by date and coin, compute per-coin stats, and export to text and excel using rio.
Begin with essential programming elements in R, covering logical statements and operators, if statements, for and while loops with next and break, nested loops, user defined functions, and code optimization.
Explore logical statements in R using if, else if, and else, with relational and logical operators. Learn vector and elementwise comparisons and the difference between = and == through examples.
Learn how to use if statements, else if, and else in R, compare numbers and vectors with relational operators, apply logical and negation operators, and simulate simple coin toss scenarios.
Learn how to use for loops in R to iterate over a vector, initialize a running sum, and compute a final total, as in summing 1 to 5 to 15.
Master for loops by iterating over number sequences and vectors, printing iterations and computing sums, then count even numbers with the modulus operator.
Introduce break and next statements for loops in R, showing how break exits a loop and how next proceeds to the next iteration, with practical examples.
Master for loops with next and break statements. Learn how break stops a loop when the sum reaches 100, and how next skips even numbers to print only odd numbers.
Explore the while loop, its condition-driven iteration vs a for loop, and how a control variable and test expression govern execution, including a practical example printing squares until five.
Explore while loops in R for beginners: sum numbers from 1 to 10 with initialization and i increment, handle infinite loops with a break, and compare with for loops.
Explore nested loops in R, using for and while loops to traverse matrices and three-dimensional arrays, and learn about performance considerations and techniques to avoid loops discussed in part 1.
Explore how to use nested for loops in R to iterate over matrices and arrays, including 3-dimensional arrays, by looping over rows and columns and printing each element.
Learn to write your own functions in R with function syntax, default arguments, and returning values; explore returning multiple outputs with a list and using ellipses to pass extra arguments.
Define and use your own functions in R, including power and string concatenation, with default arguments, multiple outputs, ellipses, anonymous functions, and calling from separate scripts.
Explore how vectorized coding in R replaces loops for faster, cleaner code, and use the apply family to operate on matrices and lists with logical testing and element-wise selection.
Explore vectorized coding in r with the apply family functions (lapply, sapply), perform max over list elements, extract elements from lists and matrices, and use replicate for random digit generation.
Explore essential R programming concepts, including if statements, loops, user defined functions, and simulation with coin toss and dice throw, using mean value and apply for probabilistic experiments.
Simulate coin tosses and dice throws in R through this assignment walkthrough. Build coin toss and dice throw functions and estimate probabilities through replication and mean values.
Explore base graphics in R for beginners, creating scatter, line, bar, histogram, and box plots, and save plots with the graphics devices package.
Plot two numeric variables with plot, customize color, axis limits, labels, and title, and build an R script to reproduce a scatter plot from air quality data (wind and ozone).
Create line charts in base graphics by mapping x and y variables. Draw lines or dots, add multiple lines, adjust line width, colors, labels, limits, and legends.
Learn to create and customize histograms and density plots in R using base graphics, including breaks, colors, borders, labels, and combining histogram with density for distribution visualization.
Learn to draw box plots in R to visualize the distribution of a numeric variable, showing median, quartiles, and interquartile range, including comparisons across a factor like cylinders.
Learn to create bar charts in R, including stacked and grouped options, using a data frame of cylinders and mpg. Use table counts and barplot with labels and colors.
Explore mosaic plots to visualize data from two or more variables, where subgroup frequencies are shown by surface area and colors encode categories like gender and eye color.
Use the par function to customize graphical parameters in base R, including symbols, colors, text size, axis labels, and margins for publication-ready plots.
Explore how to customize graphical parameters in R, including symbol types, text and axis labels, colors, line types, fonts, and margins, with hands-on scatter and bar plots.
Explore how to create and arrange multiple subplots with a grid in base graphics using mfrow and mfcol, control orientation, and save figures in formats like png, bmp, or pdf.
Learn base graphics in R with ggplot2 to analyze diamonds data, create a volume column, price versus volume by cut, and explore coin toss and dice simulations with histograms.
Walk through sampling 5000 diamonds, computing volume as x*y*z, and plotting price versus volume by cut, then simulate coin tosses to show tails approaching 0.5 as tosses grow.
Simulate coin tosses across multiple cycles to study the distribution of heads, visualize with histograms, and apply operations to a data frame, showing convergence toward a normal distribution.
In this assignment walkthrough, learn to simulate a three-player dice game with 50 throws in R, replicate players, and plot scatter points, cumulative sums, and histograms.
Marco thanks you for joining this beginners course and encourages ongoing coding with small projects using R. He invites you to explore data science concepts and share newfound knowledge.
Are you one of the people that would like to start a data science career or are you just fond of using data for data analysis in your spare time or for your job? Do you use spreadsheets for data cleaning, wrangling, visualization, and data analysis? I think it is time to enhance your hobby or your career path with learning adequate skills such as R.
R is s a programming language that enables all essential steps when you are dealing with data like:
importing,
exporting,
cleaning,
merging,
transforming,
analyzing,
visualizing,
and extracting insights from the data.
Originally R began as a free software environment for statistical computing with graphics supported. Over the years with the rapid development of computing power and the need for tools used for mining and analyzing tons of data that are being generated on every step of our lives, R has emerged into something much greater than its original laid path. Nowadays the R community is vast, every day thousands of people start learning R, and every day new R's libraries are being made and released to the world. These libraries solve different users' needs because they provide different functions for dealing with all kinds of data.
If you are still not convinced to join me on a journey where foundations for your R skills will be laid, please bear with me a bit more. In this R for Beginners course, you will dive into essential aspects of the language that will help you escalate your learning curve. Course first gently touches the basics like:
how to install R and how to install R's Integrated Development Environment (IDE) RStudio,
then you will learn how to create your first R script and R project folder,
R project folder will be your baseline folder where all your scripts and assignments will be saved,
you will learn how to install different R packages and how to use functions provided with each package.
After these first steps, you will dive into sections where all major R data structures are presented. You will be able to:
differentiate among each data structure,
use built-in functions to manipulate data structures,
reshape, access elements, and convert R objects,
import data from many different sources into R's workspace and
export R objects to different data sources.
When you will have a grasp of what R is capable of, a section devoted to programming elements will guide you through essential steps for writing a programming code that can execute repetitive tasks. Here you will master:
your first loops,
conditional statements,
your custom made functions,
and you will be able to optimize your code using vectorization.
It is said that a picture can tell an observer a powerful story and holds a stronger message than a thousand words combined. In the final section of this course, the greatest R's power is revealed, the power to tell the story by using data visualization. Here you will master how to build:
scatterplots,
line charts,
histograms,
box plots,
bar charts,
mosaic plots,
how to alter R's default graphical parameters to make beautiful figures,
and how to export a figure from R to a proper format for further sharing with your colleagues.
If you are still not convinced to start learning R, I will share with you how the course is structured:
Each section holds separate exercises covering learning material that is related to the section's topic.
Normally each exercise begins with a short intro that provides a basic understanding of the topic, then a coding exercise is presented.
During coding exercise, you will write the R code for executing given tasks.
At the end of each section, an assignment is presented.
Each assignment tests the skills you have learned during a given section.
In the last two assignments, you will write a code to build a simulation environment where you will execute the simulation and present the results with proper visualization techniques.
Do not lose more time and please enroll in the course today. I guarantee you will learn a lot and you will enjoy the learning process.