Intermediate R
Continue your journey to becoming an R ninja by learning about conditional statements, loops, and vector functions.
Kurs Kostenlos Starten6 Stunden14 Videos81 Übungen620.298 LernendeLeistungsnachweis
Kostenloses Konto erstellen
oder
Durch Klick auf die Schaltfläche akzeptierst du unsere Nutzungsbedingungen, unsere Datenschutzrichtlinie und die Speicherung deiner Daten in den USA.Trainierst du 2 oder mehr?
Versuchen DataCamp for BusinessBeliebt bei Lernenden in Tausenden Unternehmen
Kursbeschreibung
Intermediate R is the next stop on your journey in mastering the R programming language. In this R training, you will learn about conditional statements, loops, and functions to power your own R scripts. Next, make your R code more efficient and readable using the apply functions. Finally, the utilities chapter gets you up to speed with regular expressions in R, data structure manipulations, and times and dates. This course will allow you to take the next step in advancing your overall knowledge and capabilities while programming in R.
Trainierst du 2 oder mehr?
Verschaffen Sie Ihrem Team Zugriff auf die vollständige DataCamp-Plattform, einschließlich aller Funktionen.In den folgenden Tracks
Grundlagen der R-Programmierung
Gehe zu Track- 1
Conditionals and Control Flow
KostenlosIn this chapter, you'll learn about relational operators for comparing R objects, and logical operators like "and" and "or" for combining TRUE and FALSE values. Then, you'll use this knowledge to build conditional statements.
Relational Operators50 xpEquality100 xpGreater and less than100 xpCompare vectors100 xpCompare matrices100 xpLogical Operators50 xp& and |100 xp& and | (2)100 xpReverse the result: !50 xpBlend it all together100 xpConditional Statements50 xpThe if statement100 xpAdd an else100 xpCustomize further: else if100 xpElse if 2.050 xpTake control!100 xp - 2
Loops
Loops can come in handy on numerous occasions. While loops are like repeated if statements, the for loop is designed to iterate over all elements in a sequence. Learn about them in this chapter.
While loop50 xpWrite a while loop100 xpThrow in more conditionals100 xpStop the while loop: break100 xpBuild a while loop from scratch100 xpFor loop50 xpLoop over a vector100 xpLoop over a list100 xpLoop over a matrix100 xpMix it up with control flow100 xpNext, you break it100 xpBuild a for loop from scratch100 xp - 3
Functions
Functions are an extremely important concept in almost every programming language, and R is no different. Learn what functions are and how to use them—then take charge by writing your own functions.
Introduction to Functions50 xpFunction documentation100 xpUse a function100 xpUse a function (2)100 xpUse a function (3)100 xpFunctions inside functions100 xpRequired, or optional?50 xpWriting Functions50 xpWrite your own function100 xpWrite your own function (2)100 xpWrite your own function (3)100 xpFunction scoping50 xpR passes arguments by value50 xpR you functional?100 xpR you functional? (2)100 xpR Packages50 xpLoad an R Package100 xpDifferent ways to load a package50 xp - 4
The apply family
Whenever you're using a for loop, you may want to revise your code to see whether you can use the lapply function instead. Learn all about this intuitive way of applying a function over a list or a vector, and how to use its variants, sapply and vapply.
lapply50 xpUse lapply with a built-in R function100 xpUse lapply with your own function100 xplapply and anonymous functions100 xpUse lapply with additional arguments100 xpApply functions that return NULL50 xpsapply50 xpHow to use sapply100 xpsapply with your own function100 xpsapply with function returning vector100 xpsapply can't simplify, now what?100 xpsapply with functions that return NULL100 xpReverse engineering sapply50 xpvapply50 xpUse vapply100 xpUse vapply (2)100 xpFrom sapply to vapply100 xp - 5
Utilities
Mastering R programming is not only about understanding its programming concepts. Having a solid understanding of a wide range of R functions is also important. This chapter introduces you to many useful functions for data structure manipulation, regular expressions, and working with times and dates.
Useful Functions50 xpMathematical utilities100 xpFind the error100 xpData Utilities100 xpFind the error (2)100 xpBeat Gauss using R100 xpRegular Expressions50 xpgrepl & grep100 xpgrepl & grep (2)100 xpsub & gsub100 xpsub & gsub (2)50 xpTimes & Dates50 xpRight here, right now100 xpCreate and format dates100 xpCreate and format times100 xpCalculations with Dates100 xpCalculations with Times100 xpTime is of the essence100 xp
Trainierst du 2 oder mehr?
Verschaffen Sie Ihrem Team Zugriff auf die vollständige DataCamp-Plattform, einschließlich aller Funktionen.In den folgenden Tracks
Grundlagen der R-Programmierung
Gehe zu TrackVoraussetzungen
Introduction to RFilip Schouwenaars
Mehr AnzeigenData Science Instructor at DataCamp
Was sagen andere Lernende?
Melden Sie sich an 15 Millionen Lernende und starten Sie Intermediate R Heute!
Kostenloses Konto erstellen
oder
Durch Klick auf die Schaltfläche akzeptierst du unsere Nutzungsbedingungen, unsere Datenschutzrichtlinie und die Speicherung deiner Daten in den USA.