x g y
1 1 High 6.290664
2 2 High 6.607385
3 3 High 11.538793
4 4 High 15.160928
5 5 High 16.679197
6 1 Low 6.864121
7 2 Low 10.130788
8 3 Low 12.841266
9 4 Low 14.754435
10 5 Low 17.430470
ReefCloud R/Statistics resources
1 Purpose
This tutorial series should be considered reference and background materials in support of preparation for more advanced statistical analyses with R. The topics covered progress from introductory and foundational through to more advanced and as such, the tutorials are intended to be consumed and worked through largely in the order laid out in the sidebar menu to the left.
2 Format of tutorials
2.1 R code
Throughout the tutorials, R code snippets will be presented in a block such as:
This format is partially reminiscent of the layout of code editors, albeit with a very opinionated color scheme.
- the R code appears as the text over the faint yellow background.
- any output appears below the code (white background) and in red font
- the light gray numbers in the left hand gutter represent the line numbers. These can be useful when trying to draw attention to a particular line of code
- the light gray text in the R code block beginning with two hash symbols ‘##’ are comments
- in the upper right hand corner there is a clipboard symbol. Clicking on this symbol will copy the code to the clipboard to help you transfer the code to your own R session.
Occasionally (and particularly within tables) code snippets may alternatively be presented without the line number gutter. In such cases, there tends to only be a single line of code and there are substantial space savings if the gutter is removed.
2.2 Bash (shell) code
Bash is a command-line shell that gives you access and control over your computer’s operating system. Whilst the majority of the tutorials in this series are focused on R, there are a couple of tutorials on other supporting topics (like version control) that might be interfaced via a shell (commands entered on a terminal). Furthermore, some software installation and/or configuration instructions might be in the form of shell commands.
Such commands are presented as:
2.3 Plain text
The contents of plain text files will similarly be presented either as:
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Maecenas sed metus congue risus sagittis viverra. Etiam
hendrerit orci arcu, et vehicula libero vulputate nec.
Aliquam placerat lacinia ex sit amet varius. Suspendisse
potenti. Nam tristique fringilla lacus id tincidunt. Donec
quis turpis tempus leo pharetra malesuada. Vivamus consequat
a quam nec vestibulum.or when necessary to save space: