June 2016
Beginner to intermediate
1783 pages
71h 22m
English
In scientific analysis, we often need to represent data on a logarithmic scale. In this recipe, we will see how we can do this easily in R.
All you need to try out in this recipe is to run R and type the recipe in the command prompt. You can also choose to save the recipe as a script so that you can use it again later on.
The simplest way to create an axis logarithmic is to use the log argument in the plot() command:
plot(10^c(1:5),log="y",type="b")

The log argument takes character values, specifying which axes should be logarithmic: x for the x-axis only, y for the y-axis only, and xy
Read now
Unlock full access