Number Patterns
Different Ways of Counting with R
Try the following in R:
By clicking on the links, you should see the same result as
you would get from R.
Now, figure out the R code for making the following patterns (also
called
sequences ):
- 5, 10, 15, 20
- 14, 21, 28, ..., 49
- 12, 15, 18, ..., 300
- 13, 16, 19, ..., 301
Powers
- If you type 3^2, R calculates 3*3: 9.
- If you type 3^4, R calculates 3*3*3*3: 81.
What happens when you try: