/
Introduction.qmd
72 lines (63 loc) · 4.53 KB
/
Introduction.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# What is R ?
R is a free, user developed, object-oriented statistical programming language
that originates in the ‘S’ and ‘S Plus’ languages developed during the 1970s
and 1980s. It has a large audience in the science and statistics communities and
is increasingly used in the social sciences for teaching and research purposes.
Anyone can install and use R without charge, and to some extent contribute to
and amend the existing program itself. R can be downloaded from the
[Comprehensive R Archive Network (CRAN)](https://cran.r-project.org/) website.
Installation instructions as well as guides, tutorials and FAQ are available on
the CRAN website.
R is particularly favoured by users who want to develop their own statistical
functions or implement technical advances that are not yet available in
commercial packages. The existence of a vast number of user written packages
(17,672 at the time of writing this guide) is one of the great strengths of R.
Users who want to contribute should be aware that in order to be part of the R
archive, a minimum set of rules need nonetheless to be followed.
Although R can perform most of the analyses available in generalist software
such as Stata, SPSS, or SAS, it has a broader potential since it can also be
used for mapping, data mining or machine learning. Being a language also means
that there are often several ways to carry out analyses in R, each one with its
advantages and inconvenient. Users can also easily produce publication quality
output from R thanks to its integration with the Markdown LaTeX document
presentation system, and R graphs can also be imported into MS Word or
LibreOffice documents.
By contrast with other statistical software, the R interface is rather minimal
and consist merely of a terminal. In line with programming languages such a
Python or C, R users tend to access it via an interface, or Integrated
Development Environment (IDE). This guide uses the R Studio development
environment, one of the most common IDE for R. The data used in this guide is
the [British Social Attitudes Survey, 2017, Environment and Politics: Open Access Teaching
Dataset](https://beta.ukdataservice.ac.uk/datacatalogue/studies/study?id=8849),
which can be downloaded from the UK Data Service website without registration.
The website also has instructions on how to acquire and download large-scale
survey datasets. Links and further information about the other training
resources available online are provided at the end of this document.
<!-- ## Pros and cons of R relative to other statistical software -->
Although R has advantages over other statistical analysis software, it also has
a few downsides, both of which are summarised below. Users should be reminded
that as open-source software, R and its packages are developed by volunteers,
which makes it a very flexible and dynamic project, but at the same time reliant
on developers’ free time and goodwill.
```{r table,echo=F}
knitr::kable(col.names=c("Pros","Cons"), align = 'l',format="markdown",
rbind(
c(("R is free and allows users to perform almost any analysis they want."),("The learning curve may be steep for users who do not have a prior background in statistics or programming.")),
c(("R puts statistical analysis closer to the reach of individual citizens rather than specialists."),""),
c("",""),
c(("Transparency of use and programming of the software and its routines, which improves the peer-reviewing and quality control of the software in many cases."),""),
c(("Very flexible."),("Problem solving (for both advanced users and beginners) may be time-consuming, depending on how common the problem encountered, and may lead to more time spent solving technical rather than substantive issues.")),
c("",""),
c(("Availability of a wide range of advanced techniques not provided in other statistical software"),("Many people who design R packages are, or will become busy academics. Packages can stop being maintained without notice.")),
c("",""),
(c("A very large user base provides abundant documentation, tutorials, and web pages.",""))
)
,booktabs = TRUE,
,escape = F,
caption = 'Advantages and inconvenients of R'
)
```
There are several (sometimes many) ways of achieving a particular result in R.
This can be confusing for novice researchers, but at the same time will allow users to
tightly adjust their programmes to their needs.
\newpage