Defensive R Programming
Learn defensive programming in R to make your code more robust.
Comece O Curso Gratuitamente4 horas16 vídeos51 exercícios4.571 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
Writing R scripts is easy. Writing good R code is hard. In this course, we'll discuss defensive programming - a set of standard techniques that will help reduce bugs and aid working in teams. We examine techniques for avoiding common errors and also how to handle the inevitable error that arises in our code. The course will conclude looking at when to make the transition from script to project to package.
Para Empresas
Treinar 2 ou mais pessoas?
Obtenha acesso à biblioteca completa do DataCamp, com relatórios, atribuições, projetos e muito mais centralizadosNas seguintes faixas
Desenvolvedor R
Ir para a trilha- 1
Avoiding Conflict
GratuitoIn this first chapter, you'll learn what defensive programming is, and how to use existing packages for increased efficiency. You will then learn to manage the packages loaded in your environment and the potential conflicts that may arise.
- 2
Early warning systems
Programming is simpler when you get feedback on your code execution. In R, we use messages, warnings and errors to signal to keep the user informed. This chapter will discuss when and where you should use these communication tools.
Early warning systems50 xpTo TRUE or not to T50 xpLet's be evil100 xpIf it weren't for those pesky kids50 xpMessage in a bottle50 xpDid you get the message?50 xpSuppressing startup messages100 xpStop being noisy!!!100 xpUsing message in practice100 xpYou have been warned50 xpMessages vs Warnings50 xpSuppressing warnings100 xpStop (right now)50 xpWarnings vs Stop50 xpUsing the stop() function100 xp - 3
Preparing your defenses
We can avoid making mistakes using a consistent programming approach. In this chapter, we will introduce you to R best practices.
Preparing your defences50 xpWhat does DRY mean?50 xpRefactoring: functions100 xpJust one comment50 xpHeader comments100 xpA little bit dotty50 xpUse a full stop in variable names50 xpAvoiding the .100 xpCoding Style50 xpImportance of consistent style50 xpStatic Code Analysis for R50 xpCode tidying100 xpMore linting100 xp - 4
Creating a Battle Plan
Creating a script is nice, but working on a project with several scripts and assets requires structure. This final chapter will teach you good organization practices, so you can go from script to package with an optimal workflow.
A battle plan50 xpThe importance of consistency50 xpGive me some space50 xpHuman readable filenames50 xpWhat date format should we use?50 xpOrganizing a project50 xpAvoiding absolute directories50 xpThe input/ directory50 xpAbsolute vs relative100 xpGraphics and output50 xpGenerating graphics50 xpGraphics/100 xpOne final work flow100 xp
Para Empresas
Treinar 2 ou mais pessoas?
Obtenha acesso à biblioteca completa do DataCamp, com relatórios, atribuições, projetos e muito mais centralizadosNas seguintes faixas
Desenvolvedor R
Ir para a trilhacolaboradores
pré-requisitos
Intermediate RColin Gillespie
Ver MaisAssoc Prof at Newcastle University, Consultant at Jumping Rivers
O que os outros alunos têm a dizer?
Junte-se a mais de 15 milhões de alunos e comece Defensive R Programming 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.