parent
963369deaf
commit
ab429dccc3
|
@ -1,6 +1,6 @@
|
||||||
# Workflow: basics
|
# Workflow: basics
|
||||||
|
|
||||||
You've now have some experience running R code. I didn't give you many details, but you've obviously figured out the basics, or you would've thrown this book away in frustration! Before we go any further, let's make sure you've got a solid foundation in running R code and, and that you know about some of the most helpful RStudio features.
|
You now have some experience running R code. I didn't give you many details, but you've obviously figured out the basics, or you would've thrown this book away in frustration! Before we go any further, let's make sure you've got a solid foundation in running R code and, and that you know about some of the most helpful RStudio features.
|
||||||
|
|
||||||
## Coding basics
|
## Coding basics
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ object_name <- value
|
||||||
|
|
||||||
When reading that code say "object name gets value" in your head.
|
When reading that code say "object name gets value" in your head.
|
||||||
|
|
||||||
You will make lots of assignments and `<-` is a pain to type. Don't be lazy and use `=`: it will work, but it will cause confusion later. Instead, use RStudio's keyboard shortcut: Alt + - (the minus sign). Notice that RStudio automagically surrounds `<-` with spaces, which is a good code formatting practice. Code is miserable to read on a good day, so giveyoureeyesabreak and use spaces.
|
You will make lots of assignments and `<-` is a pain to type. Don't be lazy and use `=`: it will work, but it will cause confusion later. Instead, use RStudio's keyboard shortcut: Alt + - (the minus sign). Notice that RStudio automagically surrounds `<-` with spaces, which is a good code formatting practice. Code is miserable to read on a good day, so giveyoureyesabreak and use spaces.
|
||||||
|
|
||||||
## What's in a name?
|
## What's in a name?
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ Here you can see all of the objects that you've created.
|
||||||
training your brain to notice even the tiniest difference will pay off
|
training your brain to notice even the tiniest difference will pay off
|
||||||
when programming.)
|
when programming.)
|
||||||
|
|
||||||
1. Tweak the each of the following R commands so that they run correctly:
|
1. Tweak each of the following R commands so that they run correctly:
|
||||||
|
|
||||||
```{r, eval = FALSE}
|
```{r, eval = FALSE}
|
||||||
library(ggplot2)
|
library(ggplot2)
|
||||||
|
|
Loading…
Reference in New Issue