-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathch1_introduction.R
More file actions
37 lines (26 loc) · 997 Bytes
/
ch1_introduction.R
File metadata and controls
37 lines (26 loc) · 997 Bytes
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
# See ch1_introduction.pdf
# ch1_introduction.R
# Code from Chapter 1 of Applied Statistics with R
# Text and code used from:
# Applied Statistics with R
# 2021-07-23
# The license for Applied Statistics with R is given in the line below.
# This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License.
# The most current version of Applied Statistics with R should be available at:
# https://github.com/daviddalpiaz/appliedstats
# To run this R script select all of the text
# then click the icon
# Run the current line or selection
# Note the output in the Console window
#1.2 Conventions
#R code will be typeset using a monospace font which is syntax highlighted.
a=3
b=4
sqrt(a ^ 2 + b ^ 2)
#R output lines, which would appear in the console will begin with ##. They will generally not be syntax highlighted.
## [1] 5
# The following 3 lines have been added to the code in ch1
a
b
sqrt(a ^ 2 + b ^ 2)
# End of Chapter 1 code