| R |
(3 + (5 * (2 ^ 2))) # hard to read
3 + 5 * 2 ^ 2 # clear, if you remember the rules
3 + 5 * (2 ^ 2) # if you forget some rules, this might help
|
| R |
5e3 # Note the lack of minus here
|
| R |
getwd() #returns an absolute filepath
|
| R |
log(1) # natural logarithm
|
| R |
log10(10) # base-10 logarithm
|
| R |
1 == 1 # equality (note two equals signs, read as "is equal to")
|
| R |
1 != 2 # inequality (read as "is not equal to")
|
| R |
1 <= 1 # less than or equal to
|
| R |
1 >= -9 # greater than or equal to
|
| R |
x <- x + 1 #notice how RStudio updates its description of x on the top right tab
y <- x * 2
|
| R |
min_height
max.height
_age
.mass
MaxLength
min-length
2widths
celsius2kelvin
|
| R |
min_height
max.height
MaxLength
celsius2kelvin
|
| R |
_age
min-length
2widths
|
Source: The Carpentries, https://swcarpentry.github.io/r-novice-gapminder/01-rstudio-intro/index.html
This work is licensed under a Creative Commons Attribution 4.0 License.
Last modified: Thursday, 15 December 2022, 3:45 PM