Summary
Let's wrap up this chapter.
Let’s summarize what we’ve learned so far in this chapter.
-
Work from a script: We discussed that we should always work from a script and annotate code. Creating a clear and intelligible code file is extremely important, both for ourselves and for others with whom we share our code.
-
Objects in R: We learned that R works by creating objects. We can use the assign operator (
<-
) to create named objects and assign values to them. -
Functions in R: We discussed functions in R, which are pieces of code that perform specific tasks. Functions take arguments that allow us to customize the function. Importantly, functions often have default values for many of their arguments, and it’s useful to know what those default values are.
-
Setting up our data: We learned that we need to be smart about how we set up a data file before bringing it into R. Remember that spreadsheets aren’t scrapbooks.
-
Data frames in R: We learned that vectors and data frames are the most essential and important basic units in R. Understanding how to navigate and manipulate them is key.
Get hands-on with 1400+ tech skills courses.