Start Free Preview

Buying via our links supports this free directory · Affiliate disclosure.
Course facts
  • Payment: Free Preview (Paid Upgrade)
  • Learning style: Self-paced, start anytime
  • Format: Text & Interactive
  • Video access: Streaming Only
  • Before you start: Introduction to R
DataCamp details
  • Chapters: 5
Created byDataCamp
Available onDataCamp

Course Details
Learning Style

Start Anytime

Level

Beginner

Study Mode

100% Online

Duration

Short (< 10 Hours)

Languages
Audio Language

English

Outcomes
Certificate

Certificate of Completion

Price & Terms
Pricing Model

Free Preview (Paid Upgrade)

Technical
Content Medium

Text & Interactive

Video Access

Streaming Only

Specification
Access

Subscription

Write R scripts with conditional logic, loops and your own functions, then use lapply, sapply, vapply, regular expressions and dates and times.

At a glance
Duration6 hrs
LevelBeginner
CertificateCertificate of Completion
LanguageEnglish
AccessSubscription
Add your review
Add to wishlistAdded to wishlistRemoved from wishlist 0
Add to compare

Conditional statements, loops and functions power your own R scripts, and the apply functions make that code more efficient and readable. Here you make decisions with relational and logical operators, repeat work over vectors, lists and matrices, and write your own functions with required and optional arguments. Later lessons replace for loops with lapply, sapply and vapply, search and replace text with regular expressions, and calculate with dates and times.

What You Will Achieve

  • Combine relational and logical operators to steer a script through if, else if and else branches.
  • Write while and for loops that react to conditions and exit early with break or skip ahead with next.
  • Write custom R functions with required and optional arguments, then swap explicit loops for lapply, sapply or vapply.
  • Detect and replace text patterns with grepl, grep, sub and gsub, and calculate with dates and times in R.


Program Overview

Conditionals, Control Flow and Loops

Comparing R objects, combining TRUE and FALSE values, and repeating code until a condition changes or a sequence ends.

  • Comparing vectors and matrices
  • Combining values with &, | and !
  • The if statement with else and else if
  • While and for loops with break and next

Writing Functions and the Apply Family

Reading documentation, building your own functions, loading packages, and applying a function over a list or vector.

  • Function documentation and optional arguments
  • Function scoping and passing arguments by value
  • Loading an R package
  • lapply, sapply and vapply, including anonymous functions

Utilities for Text, Data, Dates and Times

Useful built-in tools for math, data structures, regular expressions, and working with times and dates.

  • Mathematical and data utilities
  • Pattern matching and replacement with regular expressions
  • Creating and formatting dates and times
  • Calculations with dates and times

Certificate Awarded (Paid)

Complete all course activities to earn it.


Job Outlook

Control flow, custom functions and text and date handling in R are used in data manipulation and analysis work, where analysts and data scientists write scripts to clean and process data.


Our take

Good for: R learners ready to move past single commands and write scripts that make decisions, repeat work and handle text and dates.

Keep in mind: Despite its Beginner label, it is meant for learners who already write basic R code and want to take the next step.

Bottom line: A practical step into R programming that pairs control flow and custom functions with the apply family, regular expressions and date arithmetic.

Frequently Asked Questions

Do the videos have transcripts?

Yes. Each video carries a live transcript that you can reveal with the Show transcript control at the bottom left of the player, which helps when you want to reread an explanation.

What does the apply family chapter cover?

It applies a function over a list or vector with lapply, using built-in functions, your own functions, anonymous functions and extra arguments, then moves to sapply, what to do when sapply cannot simplify, and vapply.

Which date and time functions does it use?

The date and time lessons work with Sys.Date() and Sys.time() for the current moment, and with as.Date() and as.POSIXct() to create and convert date and time objects before calculating with them.

What kind of practice do the lessons include?

Most lessons are short exercises built around one task, such as finding the error in a piece of code, building a while or for loop from scratch, or reverse engineering what sapply returns.

User Reviews

0.0 out of 5
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0

No reviews yet. Be the first to review this course.

There are no reviews yet.

Write your review

Reviews can only be posted by registered learners. Log in, then you will return here to post.

×

    Report this page
    LiveTalent
    Logo
    Compare items
    • Total (0)
    Compare
    0