makeSppList: makeSppList: creates a species list for each plot

Description Usage Arguments Value Examples

View source: R/makeSppList.R

Description

This function creates a plot-level species list from live trees, microplots, quadrats, and additional species lists. This function only works for complete events and active plots.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
makeSppList(
  speciesType = c("all", "native", "exotic"),
  park = "all",
  from = 2007,
  to = 2019,
  QAQC = FALSE,
  panels = 1:4,
  locType = "VS",
  output,
  ...
)

Arguments

speciesType

Allows you to filter on native, exotic or include all species.

"all"

Default. Returns all species.

"native"

Returns native species only

"exotic"

Returns exotic species only

Value

Returns a dataframe with species list for each plot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
importData()

# Compile number of exotic species found per plot in most recent survey for all parks
exo_spp <- makeSppList(speciesType = 'exotic', from = 2015, to = 2018)
exo_spp$present<-ifelse(is.na(exo_spp$Latin_Name), 0, 1)
num_exo_per_plot <- exo_spp %>% group_by(Plot_Name) %>% summarise(numspp=sum(present, na.rm=T))

# Compile species list for a given panel of a park
PETE_spp <- makeSppList(park = 'PETE', from = 2015, to = 2015)

#--- arrange and drop unnecessary fields.
PETE_spp_final <- PETE_spp %>% arrange(Plot_Name, Latin_Name) %>%
  select(Plot_Name, Latin_Name, Common, tree.stems, stocking.index, avg.quad.cover, shrub.cover,
  addspp.present)

#--- make species list for a given plot from 2015
PETE_021_2015_spp <- PETE_spp %>% filter(Plot_Name == 'PETE-021') %>%
  select(Plot_Name, Year, Latin_Name, Common) %>% droplevels()

KateMMiller/forestMIDNarch documentation built on April 9, 2021, 3:50 p.m.