Skip to main content
HomeROptimizing R Code with Rcpp

Optimizing R Code with Rcpp

Use C++ to dramatically boost the performance of your R code.

Start Course for Free
4 Hours15 Videos52 Exercises
3,537 LearnersTrophyStatement of Accomplishment

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.
GroupTraining 2 or more people?Try DataCamp For Business

Loved by learners at thousands of companies


Course Description

R is a great language for data science, but sometimes the code can be slow to run. Combining the comfort of R with the speed of a compiled language is a great way to reclaim the performance your code deserves. C++ is a modern, high performance language that is simple enough to learn in the context of accelerating R code. With the help of the Rcpp package, C++ integrates very neatly with R. You will learn how to create and manipulate typical R objects (vectors and lists), and write your own C++ functions to dramatically boost the performance of your R code.
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more
Try DataCamp for BusinessFor a bespoke solution book a demo.
  1. 1

    Introduction

    Free

    Writing, benchmarking, and debugging your first C++ code.

    Play Chapter Now
    Welcome to the course
    50 xp
    Benchmarking with microbenchmark
    100 xp
    Simple C++ Expressions with evalCpp
    100 xp
    Conversion between numbers using cast
    100 xp
    Inline functions with cppFunction
    50 xp
    First function
    100 xp
    Euclidean distance from 0
    100 xp
    Debugging
    50 xp
    Print to the console
    100 xp
    Error messages
    100 xp
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more

Collaborators

Collaborator's avatar
Sumedh Panchadhar
Collaborator's avatar
Richie Cotton

Prerequisites

Introduction to Writing Functions in R
Team ThinkR HeadshotTeam ThinkR

R Training

See More

What do other learners have to say?

Join over 14 million learners and start Optimizing R Code with Rcpp today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.