Writing Efficient R Code
Learn to write faster R code, discover benchmarking and profiling, and unlock the secrets of parallel programming.
Comience El Curso Gratis4 horas14 vídeos43 ejercicios
Crea Tu Cuenta Gratuita
o
Al continuar, acepta nuestros Términos de uso, nuestra Política de privacidad y que sus datos se almacenan en los EE. UU.¿Entrenar a 2 o más personas?Pruebe DataCamp para empresas
Preferido por estudiantes en miles de empresas
Descripción del curso
The beauty of R is that it is built for performing data analysis. The downside is that sometimes R can be slow, thereby obstructing our analysis. For this reason, it is essential to become familiar with the main techniques for speeding up your analysis, so you can reduce computational time and get insights as quickly as possible.
Empresas
¿Entrenar a 2 o más personas?
Obtenga acceso de su equipo a la biblioteca completa de DataCamp, con informes centralizados, tareas, proyectos y másEn las siguientes pistas
- 1
The Art of Benchmarking
GratuitoIn order to make your code go faster, you need to know how long it takes to run. This chapter introduces the idea of benchmarking your code.
- 2
Fine Tuning: Efficient Base R
R is flexible because you can often solve a single problem in many different ways. Some ways can be several orders of magnitude faster than the others. This chapter teaches you how to write fast base R code.
Memory allocation50 xpWhy is this piece of code slow?50 xpTimings - growing a vector100 xpTimings - pre-allocation100 xpImportance of vectorizing your code50 xpVectorized code: multiplication100 xpVectorized code: calculating a log-sum100 xpData frames and matrices50 xpData frames vs. matrices50 xpData frames and matrices - column selection100 xpSelecting a row in a data frame50 xpRow timings100 xp - 3
Diagnosing Problems: Code Profiling
Profiling helps you locate the bottlenecks in your code. This chapter teaches you how to visualize the bottlenecks using the profvis package.
- 4
Turbo Charged Code: Parallel Programming
Some problems can be solved faster using multiple cores on your machine. This chapter shows you how to write R code that runs in parallel.
CPUs - why do we have more than one50 xpHow many cores does this machine have?100 xpWhat sort of problems benefit from parallel computing?50 xpCan this loop run in parallel (1)?50 xpCan this loop run in parallel (2)?50 xpThe parallel package - parApply50 xpMoving to parallel programming50 xpMoving to parApply100 xpThe parallel package - parSapply50 xpUsing parSapply()100 xpTimings parSapply()100 xpYou can write efficient R code!50 xp
Empresas
¿Entrenar a 2 o más personas?
Obtenga acceso de su equipo a la biblioteca completa de DataCamp, con informes centralizados, tareas, proyectos y másEn las siguientes pistas
Colin Gillespie
Ver MásAssoc Prof at Newcastle University, Consultant at Jumping Rivers
¿Qué tienen que decir otros alumnos?
¡Únete a 14 millones de estudiantes y empieza Writing Efficient R Code hoy mismo!
Crea Tu Cuenta Gratuita
o
Al continuar, acepta nuestros Términos de uso, nuestra Política de privacidad y que sus datos se almacenan en los EE. UU.