-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBlock_D_Part_7.tex
70 lines (45 loc) · 1.27 KB
/
Block_D_Part_7.tex
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
### {The R Programming Language}
The R Programming Language is a statistical , data analysis , etc
R is a free software environment for statistical computing and graphics.
<p>
### {Vector types}
texttt{R} operates on named data structures. The simplest such structure is the
vector, which is a single entity consisting of an ordered collection of
Numbers or characters.
Numeric vectors
Character vectors
Logical vectors
(also complex number vectors and colour vectors)
To create a vector, use the assignment operator and the concatenate function.
For numeric vectors, the values are simply numbers.
<code>
># week8.r
>NumVec<-c(10.4,5.6,3.1,6.4)
</code>
Alternatively we can use the texttt{assign()} command
For character vectors, the values are simply characters, specified with
quotation marks.A logical vectors is a vector whose elements are TRUE, FALSE or NA
<code>
>CharVec<-c(``blue", ``green", ``yellow")
>LogVec<-c(TRUE, FALSE)
</code>
<p>
<p>
#### {Set Theory Operations}
<p>
#### {Controlling Precision and Integerization}
<pre>
<code>
pi
round(pi,3)
round(pi,2)
floor(pi)
ceiling(pi)
</code>
</pre>
<p>
%----------------------------------------------------------------%
<p>
### {Important Introductory Topics}
<p>
#### {The texttt{head()} and texttt{tail()} functions}