This function is a generic interface into creating summaries of the Portal rodent species data. It contains a number of arguments to specify the kind of data to summarize (at what level of aggregation) and various choices for dealing with data quality, and output format.

abundance generates a table of rodent abundance

* biomass() generates a table of rodent biomass

* energy() generates a table of rodent energy (computed as 5.69 * (biomass ^ 0.75) after White et al 2004)

summarize_rodent_data(path = get_default_data_path(), clean = TRUE,
  level = "Site", type = "Rodents", length = "all", plots = length,
  unknowns = FALSE, shape = "crosstab", time = "period",
  output = "abundance", fillweight = (output != "abundance"),
  na_drop = switch(tolower(level), plot = FALSE, treatment = TRUE, site =
  TRUE), zero_drop = switch(tolower(level), plot = FALSE, treatment =
  TRUE, site = TRUE), min_traps = 1, min_plots = 24, effort = FALSE,
  download_if_missing = TRUE)

abundance(...)

biomass(...)

energy(...)

summarise_rodent_data(path = get_default_data_path(), clean = TRUE,
  level = "Site", type = "Rodents", length = "all", plots = length,
  unknowns = FALSE, shape = "crosstab", time = "period",
  output = "abundance", fillweight = (output != "abundance"),
  na_drop = switch(tolower(level), plot = FALSE, treatment = TRUE, site =
  TRUE), zero_drop = switch(tolower(level), plot = FALSE, treatment =
  TRUE, site = TRUE), min_traps = 1, min_plots = 24, effort = FALSE,
  download_if_missing = TRUE)

Arguments

path

path to location of downloaded Portal data; or "repo" to retrieve data from github repo

clean

logical, load only QA/QC rodent data (TRUE) or all data (FALSE)

level

summarize by "Plot", "Treatment", or "Site"

type

specify subset of species; either all "Rodents" or only "Granivores"

length

specify subset of plots; use "All" plots or only "Longterm" plots (to be deprecated)

plots

specify subset of plots; can be a vector of plots, or specific sets: "all" plots or "Longterm" plots (plots that have had the same treatment for the entire time series)

unknowns

either removes all individuals not identified to species (unknowns = FALSE) or sums them in an additional column (unknowns = TRUE)

shape

return data as a "crosstab" or "flat" list

time

specify the format of the time index in the output, either "period" (sequential Portal surveys), "newmoon" (lunar cycle numbering), "date" (calendar date)

output

specify whether to return "abundance", or "biomass", or "energy"

fillweight

specify whether to fill in unknown weights with other records from that individual or species, where possible

na_drop

logical, drop NA values (representing insufficient sampling)

zero_drop

logical, drop 0s (representing sufficient sampling, but no detections)

min_traps

minimum number of traps for a plot to be included

min_plots

minimum number of plots within a period for an observation to be included

effort

logical as to whether or not the effort columns should be included in the output

download_if_missing

if the specified file path doesn't have the PortalData folder, then download it

...

arguments passed to summarize_rodent_data

Value

a data.frame in either "long" or "wide" format, depending on the value of `shape`

Examples

abundance("repo")
#> Loading in data version 1.96.0
#> # A tibble: 412 x 22 #> period BA DM DO DS `NA` OL OT PB PE PF PH #> <dbl> <int> <int> <int> <int> <int> <int> <int> <int> <int> <int> <int> #> 1 27 0 16 0 11 1 6 12 0 2 2 0 #> 2 28 0 15 5 15 5 4 10 0 3 1 0 #> 3 29 0 25 3 11 4 9 10 0 5 5 0 #> 4 30 0 35 7 11 5 15 9 0 1 8 0 #> 5 31 0 19 6 11 1 10 4 0 3 7 0 #> 6 32 0 23 1 23 1 6 5 0 2 10 0 #> 7 33 0 22 2 26 1 6 5 0 1 11 0 #> 8 34 0 23 3 36 9 5 1 0 1 6 0 #> 9 35 0 21 6 30 4 2 4 0 2 3 0 #> 10 36 0 15 6 16 4 1 2 0 2 4 0 #> # … with 402 more rows, and 10 more variables: PI <int>, PL <int>, PM <int>, #> # PP <int>, RF <int>, RM <int>, RO <int>, SF <int>, SH <int>, SO <int>
biomass("repo")
#> Loading in data version 1.96.0
#> # A tibble: 412 x 22 #> period BA DM DO DS `NA` OL OT PB PE PF PH #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 27 0 713 0 1405 152 214 288 0 47 14 0 #> 2 28 0 648 224 1973 881 120 219 0 62 7 0 #> 3 29 0 1032 145 1467 665 315 226 0 100 36 0 #> 4 30 0 1473 318 1397 819 473. 198 0 17 63 0 #> 5 31 0 802 289 1321 147 364 101 0 61 50 0 #> 6 32 0 1106 51 2610 97 227 147 0 42 78.7 0 #> 7 33 0 957 79 3188 110 216 93 0 21 83 0 #> 8 34 0 968 147 3966 1131 176 28 0 33 43 0 #> 9 35 0 830 284 3324 787 67 115 0 40 21 0 #> 10 36 0 627 245 1821 553 33 50 0 59 29 0 #> # … with 402 more rows, and 10 more variables: PI <dbl>, PL <dbl>, PM <dbl>, #> # PP <dbl>, RF <dbl>, RM <dbl>, RO <dbl>, SF <dbl>, SH <dbl>, SO <dbl>
energy("repo")
#> Loading in data version 1.96.0
#> # A tibble: 412 x 22 #> period BA DM DO DS `NA` OL OT PB PE PF PH #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 27 0 1568. 0 2376. 246. 497. 739. 0 121. 49.0 0 #> 2 28 0 1434. 490. 3312. 1359. 291. 575. 0 165. 24.5 0 #> 3 29 0 2304. 313. 2454. 1048. 737. 589. 0 269. 125. 0 #> 4 30 0 3281. 694. 2361. 1295. 1134. 520. 0 47.6 214. 0 #> 5 31 0 1785. 624. 2262. 240. 843. 256. 0 163. 174. 0 #> 6 32 0 2388. 109. 4515. 176. 521. 359. 0 112. 267. 0 #> 7 33 0 2108. 178. 5432. 193. 501. 249. 0 55.8 285. 0 #> 8 34 0 2155. 316. 6920. 1897. 410. 69.3 0 78.3 149. 0 #> 9 35 0 1875. 613. 5807. 1192. 158. 282. 0 108. 73.5 0 #> 10 36 0 1397. 549. 3162. 900. 78.3 126. 0 144. 101. 0 #> # … with 402 more rows, and 10 more variables: PI <dbl>, PL <dbl>, PM <dbl>, #> # PP <dbl>, RF <dbl>, RM <dbl>, RO <dbl>, SF <dbl>, SH <dbl>, SO <dbl>