public
anonymous / gist:1227092
Created

  • Download Gist
gistfile1.r
R
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
txt1 <- "ID block plot SPID TotHeight
1 1 1 4 44.5
2 1 1 4 51
3 1 1 4 28.7
4 1 1 4 24.5
5 1 1 4 27.3
6 1 1 4 20
17 1 10 1 44.5
19 1 10 1 51
1 1 11 21 28.7
2 1 11 21 24.5
3 1 11 21 27.3
4 1 11 21 20
5 1 11 21 12.88666667
6 1 11 21 7.235238095
7 1 11 21 1.583809524
"
 
txt2 <- "ID block plot SPID Species TotHeight
1 1 1 4 BENI 72
2 1 1 4 BENI 55
3 1 1 4 BENI 51
4 1 1 4 BENI 47
5 1 1 4 BENI 49
6 1 1 4 BENI 34
7 1 1 4 BENI .
8 1 1 4 BENI 51
9 1 1 4 BENI 66
10 1 1 4 BENI 40
11 1 1 4 BENI 24
12 1 1 4 BENI 62
13 1 1 4 BENI 34
14 1 1 4 BENI 49
15 1 1 4 BENI 57
16 1 1 4 BENI 22
17 1 1 4 BENI 76
18 1 1 4 BENI 56
19 1 1 4 BENI 55
20 1 1 4 BENI 29
21 1 1 4 BENI 24
22 1 1 4 BENI 18
23 1 1 4 BENI 65
24 1 1 4 BENI 55
25 1 1 4 BENI 63
26 1 1 4 BENI 57
27 1 1 4 BENI 57
28 1 1 4 BENI 57
29 1 1 4 BENI 45
30 1 1 4 BENI 83
31 1 1 4 BENI 37
32 1 1 4 BENI 56
33 1 1 4 BENI 65
34 1 1 4 BENI 75
35 1 1 4 BENI 51
36 1 1 4 BENI .
1 1 2 16 PRSE 141
2 1 2 16 PRSE 192
3 1 2 16 PRSE .
4 1 2 16 PRSE 197
5 1 2 16 PRSE 172
6 1 2 16 PRSE 143
7 1 2 16 PRSE 141
8 1 2 16 PRSE 155
9 1 2 16 PRSE 167
10 1 2 16 PRSE 155
11 1 2 16 PRSE 175
12 1 2 16 PRSE 190
13 1 2 16 PRSE 148
14 1 2 16 PRSE 180
15 1 2 16 PRSE .
"
 
 
dat1 <- read.table(textConnection(txt1), header = TRUE)
dat2 <- read.table(textConnection(txt2), header = TRUE)
 
merge(dat1, dat2, by = c("ID", "block", "plot"))

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.