Useful R Functions

r

Some useful R functions:

dput: save R

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
temp  = data.frame(a = rnorm(10),b = LETTERS[1:10])
temp
            a b
1   1.9106530 A
2   0.5568481 B
3  -2.0955271 C
4  -0.4132244 D
5   0.4280722 E
6  -0.5981550 F
7   0.4110932 G
8  -0.8469106 H
9  -0.3415771 I
10  0.2930876 J
dput(temp)
structure(list(a = c(1.91065303013136, 0.556848072515929, -2.09552705843547,
-0.413224404461701, 0.428072223420949, -0.598155043699695, 0.411093231611976,
-0.846910593628984, -0.341577057278408, 0.293087562336535), b = c("A",
"B", "C", "D", "E", "F", "G", "H", "I", "J")), .Names = c("a",
"b"), row.names = c(NA, -10L), class = "data.frame")