Optimizing R Code with Rcpp
Use C++ to dramatically boost the performance of your R code.
Comece O Curso Gratuitamente4 horas15 vídeos52 exercícios3.642 aprendizesDeclaração de Realização
Crie sua conta gratuita
ou
Ao continuar, você aceita nossos Termos de Uso, nossa Política de Privacidade e que seus dados são armazenados nos EUA.Treinar 2 ou mais pessoas?
Tentar DataCamp for BusinessAmado por alunos de milhares de empresas
Descrição do Curso
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.
Treinar 2 ou mais pessoas?
Obtenha acesso à sua equipe à plataforma DataCamp completa, incluindo todos os recursos.- 1
Introduction
GratuitoWriting, benchmarking, and debugging your first C++ code.
- 2
Functions and Control Flow
Writing functions, controlling the flow with if and else, and learning to use the three kinds of loops in C++.
C++ functions belong to C++ files50 xpWhat happens when you compile this C++ file50 xpBoiler plate100 xpWriting functions in C++50 xpFirst function - again100 xpExported and unexported functions100 xpR code in C++ files100 xpif and if/else100 xpFor loops50 xpCalculating square roots with a for loop100 xpBreaking out of a for loop100 xpWhile loops50 xpCalculating square roots with a while loop100 xpDo it again: do-while loop100 xp - 3
Vector classes
Manipulate and compute with Rcpp and native C++ vectors.
Rcpp classes and vectors50 xpFirst and last values of a vector50 xpIndexing a vector100 xpSum of double vector100 xpCreating vectors50 xpSequence of integers100 xpCreate vector with given values100 xpVector cloning100 xpWeighted mean50 xpWeighted mean (C++ version)100 xpHandling of missing values100 xpVectors from the STL50 xpDon't change the size of Rcpp vectors100 xpSTL vectors100 xp - 4
Case Studies
Use random numbers and write algorithms for applied time series models.
Random number generation50 xpScalar random number generation100 xpSampling from a mixture of distributions (I)100 xpSampling from a mixture of distributions (II)100 xpRolling operations50 xpRolling means100 xpRolling means (in C++)100 xpLast observation carried forward100 xpMean carried forward100 xpAuto regressive model50 xpSimulate AR(p) model100 xpSimulate MA(q) model100 xpARMA (p, q) model100 xpCongratulations!50 xp
Treinar 2 ou mais pessoas?
Obtenha acesso à sua equipe à plataforma DataCamp completa, incluindo todos os recursos.colaboradores
pré-requisitos
Introduction to Writing Functions in RTeam ThinkR
Ver MaisR Training
O que os outros alunos têm a dizer?
Junte-se a mais de 15 milhões de alunos e comece Optimizing R Code with Rcpp hoje mesmo!
Crie sua conta gratuita
ou
Ao continuar, você aceita nossos Termos de Uso, nossa Política de Privacidade e que seus dados são armazenados nos EUA.