1.4 Further information

In further parts of this book, we discuss libraries for data transformation, statistical modelling or visualisations. We are sure, however, that you will encounter problems or doubts not mentioned in this book. Where can you look for other types of information?

The easiest and quickest way is to ask someone who knows the answer and wants to help us.

It turns out that there is a large group of R enthusiasts who organise recurring meetups with presentations. In Poland, there are currently three major groups for R enthusiasts in three different cities. They meet once a month, more or less.

There are also substantial groups for R users in Wroclaw, Lodz and other cities where enthusiasts exchange information in data science meetups.

If we do not have an experienced friend, we can use the rich support system offered by R. First of all, there are built-in R functions that facilitate information lookup. The most useful ones among them are:

  • The help() function which shows the welcome page of R’s support system. The page describes the functions mentioned below in detail.

  • Functions help("sort") and ?sort show a help page devoted to the sort function. Take a look at the example shown below as well. The format of descriptions is unified for ease of use. In RStudio, you can use the F1 button to activate help for a specific function. Further help sections contain the following information: concise function description (Description section), function declarations (Usage section), explanation of all arguments (Arguments section), detailed function description (Details section), literature (References section), links to other functions (See Also section) as well as usage examples (Examples section). If we provide the package argument, we will get help related to the given package. For instance, help(package=MASS) will show the description of the MASS package.

  • args("functionName") shows the list of arguments of functionName.

  • apropos("regression") and find("regression") list functions (and objects) whose names contain the regression substring.

  • example("plot") runs a script with usage examples of plot function. Examples allow us to quickly find out how to use a function and what results we can expect.

  • help.search("keyword") browses the descriptions of functions contained in the packages we have installed and shows those functions where keyWord was found. In this case, keyWord may also contain multiple words or a phrase. The result list will additionally provide information about which package contains the functions it found.

The code below presents a sample session in R. We are looking for information about the plot() function and functions to test hypotheses. On the first line, we show help related to the plot function, followed by usage examples. The next line shows all functions with the “test” word in their names, and the last one shows functions with the phrase “normality test” in their descriptions.

?plot
example(plot)
apropos("test")
help.search("normality test")

The functions shown above look for information on a given topic by browsing packages that are already installed on the hard drive. If this proves insufficient (chances are we do not have packages with potentially interesting functions installed), we can use the resources available on the Internet. Particularly useful are the following resources:

There are multiple materials available in the Polish language on the Internet. One of the first publications was Wprowadzenie do środowiska R by Łukasz Komsta [17], but new resources appear every year. A current list of Polish materials is available at https://pl.wikipedia.org/wiki/R_(j%C4%99zyk_programowania).

John Chambers [5] published a useful book for those who wish to master the R language. If you want to learn statistical functions, in turn, we recommend a book by Brian Everitt [8]. Both books deal with the S language. However, it is almost identical with R from the user’s point of view. There are also numerous books, websites, and electronic documents that deal with various aspects of the software and the R language itself. At the end of 2007, a comprehensive book by Michael Crawley [6] was published which is worth recommending. It presents both R itself, as well as multiple statistical procedures implemented in R. Besides, there are more and more books devoted to R software for special purposes, some examples being: a book prepared by Paul Murell devoted to graphics [21], a book by Julian Faraway about linear models [10], or another work by Brian Everitt which deals with statistics basics [9]. Springer has published over 45 books devoted to R in a series called Use R!, and each of them deals with a single subject, such as spatial data analysis, data visualisation, social or genomic data etc.