A histogram is a standard way to present the distribution of a sample of numbers. It is easy to make a histogram using R with the hist() command. For example:
x = norm(n = 50, mean = 10, sd = 1)
hist(x, col = "skyblue")
Produces a histogram resembling this:
Add a rug
A rug plot can be added to more or less any graphic. The rug() command can add the rug to any side of the plot:
side = 1 is the bottom axis
side = 2 is the left axis
You can alter the colour and width of the rug lines using regular graphical parameters:
rug(x, side = 1, col = "blue")
Adds the rug like so:
Add a strip chart
A strip chart can also be added to any chart via the stripchart() command. However, you also need to specify add = TRUE to the command. Giving a bit of jitter helps to separate out points that are coincident:
R is a language with its own vocabulary and grammar. To make R work for you, you communicate with the computer using the language of R and tell it what to do. You accomplish this by typing commands directly into the program. This means that you need to know some of the words of the language and how to put them together to make a “sentence” that R understands. This book aims to help with this task by providing a “dictionary” of words that R understands.
Microsoft Excel is a powerful tool that can transform the way you use data. This book explains in comprehensive and user-friendly detail how to manage, make sense of, explore and share data, giving scientists at all levels the skills they need to maximise the usefulness of their data.
Interactions between species are of fundamental importance to all living systems and the framework we have for studying these interactions is community ecology. This is important to our understanding of the planet’s biological diversity and how species interactions relate to the functioning of ecosystems at all scales. Species do not live in isolation and the study of community ecology is of practical application in a wide range of conservation issues.
This is a book about the scientific process and how you apply it to data in ecology. You will learn how to plan for data collection, how to assemble data, how to analyze data and finally how to present the results. The book uses Microsoft Excel and the powerful Open Source R program to carry out data handling as well as producing graphs.