[1] 61
Vectors bird banding multiple vectors (solution)
Exercise
Output solution
- How many sites are there?
- How many birds were counted at the 26th site?
[1] 32
- What is the largest number of birds counted?
[1] 900
- What is the average number of birds seen at a site?
[1] 73.0339
- What is the total number of trees counted across all of the sites?
[1] 488
- What is the smallest number of trees counted?
[1] 0
- Produce a vector with the number of birds counted on sites with at least 10 trees.
[1] 28 32 10 30 NA 145 122 87 900 NA 143 98 NA 91 102 273 600
- Produce a vector with the number of trees counted on sites with at least 10 trees.
[1] 10 12 10 19 19 14 12 10 90 NA 14 10 NA 10 10 30 26
- Combine the
number_of_birds
andnumber_of_trees
vectors into a dataframe.
year site number_of_birds number_of_trees
1 2012 1 28 10
2 2012 2 32 12
3 2012 3 1 2
4 2012 4 0 3
5 2012 5 10 10
6 2012 6 22 8
7 2012 7 30 19
8 2012 8 NA 19
9 2012 9 145 14
10 2012 10 27 3
11 2012 11 36 4
12 2012 12 25 5
13 2012 13 9 8
14 2012 14 38 4
15 2012 15 21 8
16 2012 16 12 1
17 2012 17 122 12
18 2012 18 87 10
19 2012 19 36 3
20 2012 20 3 1
21 2012 21 0 2
22 2012 22 5 3
23 2012 23 55 5
24 2012 24 62 6
25 2012 25 98 8
26 2012 26 32 2
27 2012 27 900 90
28 2012 28 33 3
29 2012 29 14 4
30 2012 30 39 3
31 2012 31 56 6
32 2012 32 81 8
33 2012 33 29 NA
34 2012 34 38 4
35 2012 35 1 0
36 2012 36 0 1
37 2012 37 143 14
38 2012 38 37 3
39 2012 39 98 10
40 2012 40 77 NA
41 2012 41 92 9
42 2012 42 83 8
43 2012 43 34 4
44 2012 44 98 8
45 2012 45 40 4
46 2012 46 45 4
47 2012 47 51 5
48 2012 48 17 1
49 2012 49 22 2
50 2012 50 37 3
51 2012 51 48 5
52 2012 52 NA 4
53 2012 53 91 10
54 2012 54 73 7
55 2012 55 54 5
56 2012 56 46 8
57 2012 57 102 10
58 2012 58 273 30
59 2012 59 600 26
60 2012 60 10 1
61 2012 61 11 6