Interactive roadmap

    R Programming roadmap

    Designed for complete beginners who want to analyse data and create clear visualisations. You will learn to clean data, run basic stats, and share your findings.

    Your progress0% · 0 of 18 topics
    Done Learning Skipped OptionalClick any topic to learn more and mark your progress.
    1. 1

      Get Started with R

      0 of 3 done

      Set up your workspace and learn basic coding commands.

      Take it one step at a time and do not worry if coding feels unfamiliar at first. You've got this!
    2. 2

      Learn Data Types

      0 of 3 done

      Understand how R organises different kinds of information.

      Think of data types as organising your physical files into the right folders so you can always find what you need.
    3. 3

      Wrangle Data with Tidyverse

      0 of 3 done

      Clean and shape your tables using modern, readable R tools.

      Clean data makes every subsequent step smoother, so take your time getting your rows and columns into shape.
    4. 4

      Visualise Data with ggplot2

      0 of 3 done

      Create clear charts to show patterns in your numbers.

      A clear chart tells a story instantly, so let your data guide the visual design choices.
    5. 5

      Run Basic Statistics

      0 of 3 done

      Calculate key figures and test simple ideas in your data.

      Keep your statistical checks simple and always check your results against your charts to spot any unusual outliers.
    6. 6

      Share Reports with Quarto

      0 of 3 done

      Combine your notes, code, and charts into neat documents.

      Reproducible reports save you hours of manual updating when your raw data changes next week.

    Learn it all, with a tutor that never sleeps

    Every topic links to LevelUp lessons, practice exercises and the 24/7 AI Tutor. Your progress updates as you master lessons.

    Every topic explained

    Step 1: Get Started with R

    Set up the software on your computer so you can write and run your code in one tidy workspace.
    Read more

    R is the core engine that calculates your data, while RStudio is the friendly user interface where you type your instructions. Together, they give you a neat workspace with separate areas for your code, your saved variables, and your output charts.

    Think of R as the kitchen and RStudio as the well-organised countertops and cupboards that make cooking much easier. You install both separately on your laptop before starting any analysis.

    Getting this setup right is essential because it gives you a reliable environment to write, test, and save all your upcoming data projects without cluttering your desktop.

    • Install R first, then install RStudio separately.
    • RStudio organizes your workspace into four main panes.
    • Use the script editor to save your code for later.
    Posit RStudio
    Use R like a calculator to store numbers and words in simple named containers called variables.
    Read more

    Variables in R act like labelled storage boxes where you can keep numbers, words, or entire datasets. You assign items to a box using an arrow symbol pointing left, which tells R to store the value under your chosen name.

    For example, if you want to keep track of daily coffee sales, you might store the number twelve in a box named sales. You can then use that name in future calculations just like a regular number.

    Writing basic code is the foundation of every script you will ever build, allowing you to automate repetitive maths and keep your workflow tidy.

    • Use the assignment arrow to store values in named variables.
    • R can be used directly as a standard calculator.
    • Variable names should be descriptive and avoid spaces.
    Expand what R can do by downloading free community add-ons that unlock helpful tools and datasets.
    Read more

    Base R comes with plenty of built-in tools, but the wider community has created thousands of add-on packages that make specific tasks much easier. You download these packages from an online repository onto your computer using a simple command.

    Think of this like buying accessories for a bicycle, where adding a basket or a bell lets you carry more items or travel more comfortably. You only need to download each package once, but you load it into your session whenever you start a new project.

    Knowing how to install packages unlocks advanced data manipulation and plotting features that transform R into a professional analysis suite.

    • Packages are free community-built add-ons for R.
    • Use install.packages to download them once to your machine.
    • Use library to load the package into your current session.

    Step 2: Learn Data Types

    Group multiple items together into simple lists and ordered rows of data.
    Read more

    A vector is a single line of items that all share the same type, such as a row of numbers or a list of names. When you want to store different types of information together, like a number and a text description, you use a list instead.

    Imagine a vector as a row of identical storage bins holding only shoes, while a list is a utility drawer containing a mix of keys, notes, and coins. R relies heavily on vectors to perform calculations across entire columns instantly.

    Understanding vectors and lists helps you structure your raw information correctly before you try to clean or analyse it.

    • Vectors hold multiple items of the exact same data type.
    • Lists can combine different data types into one container.
    • Use the combine function to string items together into a vector.
    Learn how R handles spreadsheet-style tables with rows and named columns.
    Read more

    A data frame is the standard spreadsheet format in R, featuring rows and named columns where each column can hold a different type of data. This is the most common structure you will use when analysing real-world datasets.

    For instance, a customer survey dataset might have columns for customer ID as numbers, feedback comments as text, and loyalty status as categories. Each row represents a single customer response.

    Mastering data frames is crucial because almost every data cleaning, summary, and charting task you perform will start with this table format.

    • Data frames look and act like standard spreadsheet tables.
    • Columns can hold text, numbers, or logical values.
    • Every column in a data frame must have the same number of rows.
    (optional)
    Manage categories and dates properly so your analysis does not get confused by text formatting.
    Read more

    Factors are special data types in R used to manage categorical variables with fixed groups, like shirt sizes or survey ratings. Dates require specific formatting so R knows they represent chronological time rather than plain text strings.

    If you treat dates as normal text, sorting them alphabetically puts January before February, but it also places any year starting with nine before a year starting with two. Proper date types prevent these frustrating sorting errors.

    Handling factors and dates correctly ensures your statistical summaries and charts display categories and timelines in the correct logical order.

    • Factors represent categorical data with predefined groups or levels.
    • Dates need specific formatting to calculate time differences accurately.
    • Proper data types prevent sorting and grouping mistakes in reports.

    Step 3: Wrangle Data with Tidyverse

    Pick out the exact rows and columns you need from a messy table.
    Read more

    The dplyr package provides a suite of intuitive verbs that make filtering rows and selecting columns remarkably straightforward. Instead of writing complex loops, you can pick out exactly what you need using clear, readable instructions.

    Imagine you have a massive employee directory and you only want to view staff members in the marketing department whose salary exceeds a certain threshold. You use filter to keep the right rows and select to keep the right columns.

    This approach keeps your code readable and lets you isolate relevant subsets of data before running deeper investigations.

    • Use filter to keep rows that meet specific conditions.
    • Use select to choose specific columns to work with.
    • Chain commands together using the pipe operator for readability.
    Tidyverse
    Calculate new values and add them straight into your data table.
    Read more

    The mutate function lets you create brand new columns or update existing ones directly within your data table. It performs calculations on a row-by-row basis without altering your original raw data file.

    For example, if you have columns for item quantity and unit price, you can use mutate to multiply them together and create a new total cost column instantly.

    This skill is vital for transforming raw variables into meaningful metrics that answer specific business or research questions.

    • Mutate adds new columns or modifies existing ones.
    • Calculations apply automatically across every row in the table.
    • Original data remains safe unless you explicitly overwrite it.
    Calculate averages, totals, and counts broken down by different categories.
    Read more

    Grouping and summarising allows you to collapse detailed rows down into high-level summary statistics grouped by category. You can calculate totals, averages, and counts for different segments of your data in a single step.

    Think of reviewing monthly sales figures broken down by store location, where you want to see the total revenue for each city rather than every individual transaction receipt.

    This technique is essential for spotting high-level patterns and presenting executive summaries to stakeholders who want quick, clear answers.

    • Group data using specific categorical columns before summarising.
    • Combine with summarise to calculate metrics like mean or total.
    • Reduces large datasets into concise, readable summary tables.

    Step 4: Visualise Data with ggplot2

    Build charts layer by layer, starting with axes and adding points or lines.
    Read more

    The ggplot2 package builds visualisations using a layered grammar of graphics, starting with your data and mapping variables to visual axes. You then add geometric layers like points, bars, or lines on top to form the final image.

    Think of painting a picture on canvas, where you first set up the background frame, sketch the main shapes in pencil, and then add colour and labels in subsequent steps.

    Mastering this grammar gives you total creative control over every single element of your chart, allowing you to build bespoke graphics tailored to your audience.

    • Build charts by adding distinct visual layers together.
    • Map data variables to aesthetic properties like position and colour.
    • Geometric functions determine whether your plot shows points or lines.
    Show relationships between variables and compare group totals using standard graphs.
    Read more

    Different questions require different chart types to reveal insights clearly to an audience. Scatter plots work well for comparing two numeric measures, while bar charts excel at comparing totals across distinct categories.

    For instance, you might use a scatter plot to see if study hours relate to exam scores, and a bar chart to compare total sales across different product categories.

    Choosing the right chart type helps your readers grasp trends and comparisons immediately without getting confused by mismatched visuals.

    • Use scatter plots for relationships between two numeric variables.
    • Use bar charts to compare totals across different categories.
    • Match your chart type directly to the question you are asking.
    (optional)
    Make your graphs presentation-ready by adding clear titles, clean legends, and tidy layouts.
    Read more

    A chart is only effective if the audience understands what they are looking at without needing extra explanation. Polishing your work involves adding clear main titles, descriptive axis labels, and clean background themes.

    Imagine handing a report to a manager with unlabelled axes and code-style variable names; they will struggle to trust the insight. Clear labels turn a rough draft into a professional presentation piece.

    Taking time to format your outputs ensures your data visualisations communicate your findings accurately and look great in reports.

    • Add informative titles and axis labels using labs functions.
    • Apply built-in themes to clean up background grid lines.
    • Ensure legends are easy to read and correctly positioned.

    Step 5: Run Basic Statistics

    Find the middle ground and spread of your numbers using mean, median, and standard deviation.
    Read more

    Summary statistics provide a numerical snapshot of your dataset, highlighting typical values and how widely spread the data points are. Common metrics include the mean for the average, the median for the middle value, and standard deviation for variability.

    If you are reviewing house prices, the average can be skewed by a few mega-mansions, so checking the median gives you a more realistic picture of a typical home.

    Calculating these core figures is the first step in any quantitative analysis, giving you baseline numbers to reference in your reports.

    • Calculate the mean and median to find the centre of your data.
    • Use standard deviation to measure how spread out values are.
    • Be mindful of extreme outliers distorting your averages.
    Measure whether two numeric variables tend to move up or down together.
    Read more

    Correlation measures the strength and direction of the relationship between two numeric variables, running on a scale from minus one to plus one. A score near zero indicates no relationship, while scores near positive or negative one show strong patterns.

    For example, you might check the correlation between daily temperature and ice cream sales to confirm whether warmer weather reliably drives up customer purchases.

    This metric helps you spot potential connections in your data that deserve a closer look or further investigation.

    • Correlation values range between minus one and plus one.
    • Positive values mean variables increase together.
    • Correlation does not automatically prove that one variable causes the other.
    (optional)
    Draw a line of best fit to understand trends and make basic predictions.
    Read more

    Fitting a simple linear model draws a straight line of best fit through your data points to explain how one variable responds to another. This allows you to estimate future trends based on past observations.

    Think of estimating weekly advertising revenue based on how much money you spent on social media promotions that week.

    Building basic models helps you move beyond simply describing past data into making informed, data-driven estimates for the future.

    • Linear models draw a line of best fit through scatter plots.
    • Use the linear model function to calculate intercept and slope.
    • Helps estimate outcomes based on new input values.

    Step 6: Share Reports with Quarto

    Write plain text mixed with R code chunks to generate reproducible documents automatically.
    Read more

    Quarto allows you to combine plain text explanations with live R code chunks inside a single document. When you render the file, R runs your code in the background and inserts the latest charts and numbers straight into the output.

    This replaces the tedious habit of copying and pasting charts from RStudio into presentation slides, ensuring your final report always matches your current analysis.

    Learning Quarto transforms your isolated scripts into professional, shareable documents that update automatically whenever your underlying data files are refreshed.

    • Combines narrative text and R code in one document.
    • Executes code chunks during the rendering process.
    • Keeps your analysis and reporting steps tightly integrated.
    Quarto
    Add headings, bullet points, and neat tables that update themselves when your data changes.
    Read more

    A good report uses clear headings, bullet points, and neat tables to guide readers through your findings without getting lost in walls of text. Quarto uses simple markdown symbols to format your text quickly and cleanly.

    Instead of raw code output prints, you can format tables so they display clean column headers and neat grid lines for your stakeholders.

    Formatting your output properly ensures that anyone reading your work can easily digest your key insights and follow your reasoning.

    • Use markdown hashes to create clear section headings.
    • Format data frames into neat tables for display.
    • Keep narrative explanations concise around your code outputs.
    (optional)
    Render your finished work into a webpage or document you can share with colleagues.
    Read more

    Once your Quarto document is polished, you can render it into various sharing formats such as standalone web pages or PDF documents. This gives you a clean file ready to email to colleagues or upload to a shared drive.

    Imagine finishing a project and publishing it as a webpage that anyone in your team can open in their browser to view interactive charts and fresh data summaries.

    Knowing how to export your reports successfully completes the entire data workflow, taking you from raw data files all the way to shared team insights.

    • Render finished documents into HTML web pages or PDFs.
    • Ensure all code chunks run successfully before exporting.
    • Share output files easily with colleagues and stakeholders.

    Related roadmaps