-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic-installation.html
More file actions
272 lines (233 loc) · 20.7 KB
/
Copy pathbasic-installation.html
File metadata and controls
272 lines (233 loc) · 20.7 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<!DOCTYPE html>
<html lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Chapter 1 Basic Installation | Basic Statistical Computing and Data Science Using R</title>
<meta name="description" content="Chapter 1 Basic Installation | Basic Statistical Computing and Data Science Using R" />
<meta name="generator" content="bookdown 0.33 and GitBook 2.6.7" />
<meta property="og:title" content="Chapter 1 Basic Installation | Basic Statistical Computing and Data Science Using R" />
<meta property="og:type" content="book" />
<meta property="og:image" content="/Title_Page.png" />
<meta name="github-repo" content="rstudio/bookdown-demo" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Chapter 1 Basic Installation | Basic Statistical Computing and Data Science Using R" />
<meta name="twitter:image" content="/Title_Page.png" />
<meta name="author" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="prev" href="index.html"/>
<link rel="next" href="vectors-matrices-other-grouped-data.html"/>
<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li><a href="./">Data Science with R</a></li>
<li class="divider"></li>
<li><a href="index.html#section" id="toc-section"></a></li>
<li class="part"><span><b>I The Basics</b></span></li>
<li class="chapter" data-level="1" data-path="basic-installation.html"><a href="basic-installation.html"><i class="fa fa-check"></i><b>1</b> Basic Installation</a>
<ul>
<li class="chapter" data-level="1.1" data-path="basic-installation.html"><a href="basic-installation.html#r-and-rstudio"><i class="fa fa-check"></i><b>1.1</b> R and RStudio</a></li>
<li class="chapter" data-level="1.2" data-path="basic-installation.html"><a href="basic-installation.html#latex"><i class="fa fa-check"></i><b>1.2</b> LateX</a></li>
<li class="chapter" data-level="1.3" data-path="basic-installation.html"><a href="basic-installation.html#orientation"><i class="fa fa-check"></i><b>1.3</b> Orientation</a></li>
<li class="chapter" data-level="1.4" data-path="basic-installation.html"><a href="basic-installation.html#libraries-in-r"><i class="fa fa-check"></i><b>1.4</b> Libraries in R</a></li>
<li class="chapter" data-level="1.5" data-path="basic-installation.html"><a href="basic-installation.html#markdown"><i class="fa fa-check"></i><b>1.5</b> Markdown</a></li>
</ul></li>
<li class="chapter" data-level="2" data-path="vectors-matrices-other-grouped-data.html"><a href="vectors-matrices-other-grouped-data.html"><i class="fa fa-check"></i><b>2</b> Vectors, Matrices & Other Grouped Data</a>
<ul>
<li class="chapter" data-level="2.1" data-path="vectors-matrices-other-grouped-data.html"><a href="vectors-matrices-other-grouped-data.html#vectors"><i class="fa fa-check"></i><b>2.1</b> Vectors</a></li>
<li class="chapter" data-level="2.2" data-path="vectors-matrices-other-grouped-data.html"><a href="vectors-matrices-other-grouped-data.html#matrices"><i class="fa fa-check"></i><b>2.2</b> Matrices</a></li>
<li class="chapter" data-level="2.3" data-path="vectors-matrices-other-grouped-data.html"><a href="vectors-matrices-other-grouped-data.html#lists"><i class="fa fa-check"></i><b>2.3</b> Lists</a></li>
<li class="chapter" data-level="2.4" data-path="vectors-matrices-other-grouped-data.html"><a href="vectors-matrices-other-grouped-data.html#data-frames"><i class="fa fa-check"></i><b>2.4</b> Data Frames</a></li>
<li class="chapter" data-level="2.5" data-path="vectors-matrices-other-grouped-data.html"><a href="vectors-matrices-other-grouped-data.html#data-from-external-sources"><i class="fa fa-check"></i><b>2.5</b> Data From External Sources</a></li>
</ul></li>
<li class="part"><span><b>II Some Basic Probability and Statistics</b></span></li>
<li class="chapter" data-level="3" data-path="learning-about-the-data.html"><a href="learning-about-the-data.html"><i class="fa fa-check"></i><b>3</b> Learning About the Data</a>
<ul>
<li class="chapter" data-level="3.1" data-path="learning-about-the-data.html"><a href="learning-about-the-data.html#qualitative-data-visualization"><i class="fa fa-check"></i><b>3.1</b> Qualitative Data Visualization</a></li>
<li class="chapter" data-level="3.2" data-path="learning-about-the-data.html"><a href="learning-about-the-data.html#quantatiative-data-visualization"><i class="fa fa-check"></i><b>3.2</b> Quantatiative Data Visualization</a></li>
<li class="chapter" data-level="3.3" data-path="learning-about-the-data.html"><a href="learning-about-the-data.html#descriptive-statistics"><i class="fa fa-check"></i><b>3.3</b> Descriptive Statistics</a>
<ul>
<li class="chapter" data-level="3.3.1" data-path="learning-about-the-data.html"><a href="learning-about-the-data.html#measures-of-central-tendency"><i class="fa fa-check"></i><b>3.3.1</b> Measures of Central Tendency</a></li>
<li class="chapter" data-level="3.3.2" data-path="learning-about-the-data.html"><a href="learning-about-the-data.html#measures-of-spread"><i class="fa fa-check"></i><b>3.3.2</b> Measures of Spread</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="4" data-path="probability-distributions.html"><a href="probability-distributions.html"><i class="fa fa-check"></i><b>4</b> Probability Distributions</a>
<ul>
<li class="chapter" data-level="4.1" data-path="probability-distributions.html"><a href="probability-distributions.html#definition-of-probability-distributions"><i class="fa fa-check"></i><b>4.1</b> Definition of Probability Distributions</a></li>
<li class="chapter" data-level="4.2" data-path="probability-distributions.html"><a href="probability-distributions.html#types-of-probability-distributions"><i class="fa fa-check"></i><b>4.2</b> Types of Probability Distributions</a>
<ul>
<li class="chapter" data-level="4.2.1" data-path="probability-distributions.html"><a href="probability-distributions.html#binomial-distribution"><i class="fa fa-check"></i><b>4.2.1</b> Binomial Distribution</a></li>
<li class="chapter" data-level="4.2.2" data-path="probability-distributions.html"><a href="probability-distributions.html#poisson-distribution"><i class="fa fa-check"></i><b>4.2.2</b> Poisson Distribution</a></li>
<li class="chapter" data-level="4.2.3" data-path="probability-distributions.html"><a href="probability-distributions.html#geometric-distribution"><i class="fa fa-check"></i><b>4.2.3</b> Geometric Distribution</a></li>
<li class="chapter" data-level="4.2.4" data-path="probability-distributions.html"><a href="probability-distributions.html#the-normal-distribution"><i class="fa fa-check"></i><b>4.2.4</b> The Normal Distribution</a></li>
<li class="chapter" data-level="4.2.5" data-path="probability-distributions.html"><a href="probability-distributions.html#exponential-distribution"><i class="fa fa-check"></i><b>4.2.5</b> Exponential Distribution</a></li>
</ul></li>
<li class="chapter" data-level="4.3" data-path="probability-distributions.html"><a href="probability-distributions.html#uniform-distribution"><i class="fa fa-check"></i><b>4.3</b> Uniform Distribution</a></li>
</ul></li>
<li class="chapter" data-level="5" data-path="hypothesis-testing.html"><a href="hypothesis-testing.html"><i class="fa fa-check"></i><b>5</b> Hypothesis Testing</a></li>
<li class="part"><span><b>III Creating Codebooks</b></span></li>
<li class="chapter" data-level="6" data-path="missing-data.html"><a href="missing-data.html"><i class="fa fa-check"></i><b>6</b> Missing Data</a>
<ul>
<li class="chapter" data-level="6.1" data-path="missing-data.html"><a href="missing-data.html#dealing-with-missing-data"><i class="fa fa-check"></i><b>6.1</b> Dealing with Missing Data</a></li>
<li class="chapter" data-level="6.2" data-path="missing-data.html"><a href="missing-data.html#types-of-missing-data"><i class="fa fa-check"></i><b>6.2</b> Types of Missing Data</a></li>
</ul></li>
<li class="chapter" data-level="7" data-path="data-dictionaries.html"><a href="data-dictionaries.html"><i class="fa fa-check"></i><b>7</b> Data Dictionaries</a>
<ul>
<li class="chapter" data-level="7.1" data-path="data-dictionaries.html"><a href="data-dictionaries.html#purpose-of-a-data-dictionary"><i class="fa fa-check"></i><b>7.1</b> Purpose of a Data Dictionary</a></li>
<li class="chapter" data-level="7.2" data-path="data-dictionaries.html"><a href="data-dictionaries.html#components-of-a-data-dictionary"><i class="fa fa-check"></i><b>7.2</b> Components of a Data Dictionary</a></li>
<li class="chapter" data-level="7.3" data-path="data-dictionaries.html"><a href="data-dictionaries.html#benefits-of-using-a-data-dictionary"><i class="fa fa-check"></i><b>7.3</b> Benefits of Using a Data Dictionary</a></li>
<li class="chapter" data-level="7.4" data-path="data-dictionaries.html"><a href="data-dictionaries.html#examples"><i class="fa fa-check"></i><b>7.4</b> Examples</a></li>
</ul></li>
<li class="part"><span><b>IV The Tidyverse</b></span></li>
<li class="chapter" data-level="8" data-path="dplyr.html"><a href="dplyr.html"><i class="fa fa-check"></i><b>8</b> dplyr</a></li>
<li class="chapter" data-level="9" data-path="ggplot2.html"><a href="ggplot2.html"><i class="fa fa-check"></i><b>9</b> ggplot2</a></li>
<li class="part"><span><b>V Unsupervised Learning</b></span></li>
<li class="chapter" data-level="10" data-path="unsupervised-learning.html"><a href="unsupervised-learning.html"><i class="fa fa-check"></i><b>10</b> Unsupervised Learning</a></li>
<li class="chapter" data-level="11" data-path="k-means-clustering.html"><a href="k-means-clustering.html"><i class="fa fa-check"></i><b>11</b> K-Means Clustering</a></li>
<li class="chapter" data-level="12" data-path="hierarchical-clustering.html"><a href="hierarchical-clustering.html"><i class="fa fa-check"></i><b>12</b> Hierarchical Clustering</a></li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Basic Statistical Computing and Data Science Using R</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal" id="section-">
<div id="basic-installation" class="section level1 hasAnchor" number="1">
<h1><span class="header-section-number">Chapter 1</span> Basic Installation<a href="basic-installation.html#basic-installation" class="anchor-section" aria-label="Anchor link to header"></a></h1>
<div id="r-and-rstudio" class="section level2 hasAnchor" number="1.1">
<h2><span class="header-section-number">1.1</span> R and RStudio<a href="basic-installation.html#r-and-rstudio" class="anchor-section" aria-label="Anchor link to header"></a></h2>
<p>R has become a popular tool for machine learning and artificial intelligence applications. It has a wide range of packages for machine learning, including tools for clustering, classification, and regression analysis. R is also used for deep learning and neural network analysis.</p>
<p>RStudio is an integrated development environment (IDE) for R, designed to make it easier to write and run R code. It was created by the RStudio team, led by JJ Allaire, and first released in 2011. RStudio has become a popular tool for R users, particularly those who are new to the language.</p>
<p>One of the key features of RStudio is its user-friendly interface. The IDE has a clean and intuitive layout, with multiple panes that allow users to view and edit their code, interact with the console, and view plots and other output. RStudio also has a variety of built-in tools and features that make it easier to write and debug R code, including syntax highlighting, code completion, and integrated debugging tools.</p>
<p>RStudio also has a variety of tools for working with projects and packages. Users can create and manage projects, which are collections of R code, data, and other files that are organized in a single directory. RStudio also has a package manager, which allows users to install and manage R packages, and create their own packages.</p>
<p>Together, R and RStudio form a powerful toolset for data analysis and statistical modeling. Let’s begin by getting R and RStudio downloaded.</p>
<p><a href="https://www.youtube.com/watch?v=N28rnKJKRmw&list=PLhMAuJ_imnt64NMgEKgy0JWKbA0sLoG4p&index=2">How to download R and RStudio</a></p>
</div>
<div id="latex" class="section level2 hasAnchor" number="1.2">
<h2><span class="header-section-number">1.2</span> LateX<a href="basic-installation.html#latex" class="anchor-section" aria-label="Anchor link to header"></a></h2>
<p>LaTeX is a document preparation system that allows users to typeset and format high-quality documents, particularly those with mathematical equations, formulas, and symbols.</p>
<p>RStudio integrates with LaTeX by allowing users to create and compile LaTeX documents directly from within the RStudio environment. This means that users can seamlessly integrate their R code and output into their LaTeX documents, making it easy to create reproducible research reports, manuscripts, and presentations.</p>
<p><a href="https://www.youtube.com/watch?v=CvLIotw5YNs&list=PLhMAuJ_imnt64NMgEKgy0JWKbA0sLoG4p&index=3">How to download LaTeX</a></p>
</div>
<div id="orientation" class="section level2 hasAnchor" number="1.3">
<h2><span class="header-section-number">1.3</span> Orientation<a href="basic-installation.html#orientation" class="anchor-section" aria-label="Anchor link to header"></a></h2>
<p>In this tutorial, we will learn how to open an RScript. We will learn about the numeric data type in RStudio and how to perform operations using the numeric data type; such as addition, subtraction, multiplication, division, square roots, exponentiation, and logarithms.</p>
<p><a href="https://www.youtube.com/watch?v=94bFHGP1_ok&list=PLhMAuJ_imnt64NMgEKgy0JWKbA0sLoG4p&index=3">R Orientation Part 1</a></p>
<p>In this tutorial, we will learn about the integer data type in RStudio. We will learn how to perform operations with the integer data type and the logical data type. We will also learn about the character data type.</p>
<p><a href="https://www.youtube.com/watch?v=EsiYDZlmMhQ&list=PLhMAuJ_imnt64NMgEKgy0JWKbA0sLoG4p&index=4">R Orientation Part 2</a></p>
</div>
<div id="libraries-in-r" class="section level2 hasAnchor" number="1.4">
<h2><span class="header-section-number">1.4</span> Libraries in R<a href="basic-installation.html#libraries-in-r" class="anchor-section" aria-label="Anchor link to header"></a></h2>
<p>In R, a library is a collection of pre-written R functions that extend the functionality of the base R system. Libraries can be loaded into R to provide additional capabilities for data manipulation, visualization, statistical analysis, and more.</p>
<p>There are many libraries available in R, and they can be installed from the Comprehensive R Archive Network (CRAN), GitHub, or other sources. To use a library in R, it must first be installed and then loaded into the R session using the library() function. Once a library is loaded, its functions and other objects become available for use in the R session.</p>
<p>Libraries in R can be incredibly useful for performing specific tasks that may not be included in the base R system. They can also save time and effort by providing pre-written code for common operations, allowing users to focus on their specific analysis or research questions rather than writing code from scratch. Finally, because R is an open-source language, users can contribute their own libraries and share them with the wider R community.</p>
<p>This tutorial will give you a brief introduction to libraries in R.</p>
<p><a href="https://www.youtube.com/watch?v=fy4Kc5f1Rhg&list=PLhMAuJ_imnt64NMgEKgy0JWKbA0sLoG4p&index=5">R Libraries</a></p>
</div>
<div id="markdown" class="section level2 hasAnchor" number="1.5">
<h2><span class="header-section-number">1.5</span> Markdown<a href="basic-installation.html#markdown" class="anchor-section" aria-label="Anchor link to header"></a></h2>
<p>R Markdown is a markup language that enables the creation of dynamic and reproducible documents, reports, and presentations that integrate text, code, and data. R Markdown is based on the Markdown syntax and is designed to facilitate the creation of documents that combine R code, data analysis, and narrative text.</p>
<p>With R Markdown, users can create documents in a variety of formats, including HTML, PDF, Word, and PowerPoint, among others.</p>
<p>R Markdown documents are highly customizable, allowing users to control the appearance of their documents using a combination of Markdown syntax and customizable options. R Markdown also provides tools for including tables, figures, and interactive visualizations in documents.</p>
<p>R Markdown is fully integrated with RStudio, making it easy to create, preview, and publish R Markdown documents from within the RStudio environment. This integration streamlines the workflow for creating and sharing reproducible research reports, making R Markdown a valuable tool for researchers, data scientists, and other professionals who need to communicate their findings in a clear and reproducible way.</p>
<p><a href="https://www.youtube.com/watch?v=mor_pKCZPdc&list=PLhMAuJ_imnt64NMgEKgy0JWKbA0sLoG4p&index=7">R Markdown</a></p>
</div>
</div>
</section>
</div>
</div>
</div>
<a href="index.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
<a href="vectors-matrices-other-grouped-data.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
</div>
</div>
<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
<script>
gitbook.require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"github": false,
"facebook": true,
"twitter": true,
"linkedin": false,
"weibo": false,
"instapaper": false,
"vk": false,
"whatsapp": false,
"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "white",
"family": "sans",
"size": 2
},
"edit": {
"link": "https://github.com/USERNAME/REPO/edit/BRANCH/01-intro.Rmd",
"text": "Edit"
},
"history": {
"link": null,
"text": null
},
"view": {
"link": null,
"text": null
},
"download": ["_main.pdf", "_main.epub"],
"search": {
"engine": "fuse",
"options": null
},
"toc": {
"collapse": "subsection"
}
});
});
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
var src = "true";
if (src === "" || src === "true") src = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/latest.js?config=TeX-MML-AM_CHTML";
if (location.protocol !== "file:")
if (/^https?:/.test(src))
src = src.replace(/^https?:/, '');
script.src = src;
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>