report_species-class: Counts of number per taxa/stages

report_species-classR Documentation

Counts of number per taxa/stages

Description

This class is used to make the assessment of all species, and their number. It is intended as a simple way to check what fishes are present (taxa + development stage). It was altered to include ref_taxa, to allow excluding some of the most numerous taxa from reports. The taxa is reported unless a taxa has several stages, in which case the different stages for the taxa will be reported Using the split arguments the calc method of the class will count numbers, subsamples are not accounted for in the Overview. The split argument currently takes values year or month. The class is intended to be used over long periods e.g years. The plot method writes either an histogram or a pie chart of number per year/week/month.

Slots

dc

an object of class ref_dc-class

taxa

Object of class ref_taxa-class: the species

start_year

Object of class ref_year-class

end_year

Object of class ref_year-class

data

data.frame

calcdata

data.frame with data processed by the calc method

split

Object of class ref_list-class ref_list referential class choose within a list

Author(s)

Cedric Briand cedric.briand@eptb-vilaine.fr

See Also

Other report Objects: report_annual-class, report_dc-class, report_df-class, report_env-class, report_ge_weight-class, report_mig-class, report_mig_char-class, report_mig_env-class, report_mig_interannual-class, report_mig_mult-class, report_sample_char-class, report_sea_age-class, report_silver_eel-class

Examples

# launching stacomi without selecting the scheme or interface
stacomi(	database_expected=FALSE)
# the following script will load data 
# from the two Anguillere monitored in the Somme
# If you have a working database
# the following line of code will create the bilesp dataset from the "iav." 
# schema in the database

## Not run: 
  bilesp<-new("report_species")
  # split is one of "none", "year", "week", "month
  bilesp<-choice_c(bilesp,
	  dc=c(5,6,12),
	  split="year", 
	  start_year="2008",
	  end_year="2012",
	  silent=FALSE)	
  bilesp <- connect(bilesp)
  bilesp <- calcule(bilesp)
  plot(bilesp, plot.type="pie", silent=FALSE)
  plot(bilesp, plot.type="barplot", silent=FALSE)
  bilesp <- choice_c(bilesp,
	  dc=c(5,6,12),
	  split="month",
	  start_year="2015",
	  end_year="2016",
	  silent=FALSE)
  bilesp <- charge(bilesp)
  bilesp <- connect(bilesp)
  plot(bilesp, plot.type="pie", silent=FALSE)
  plot(bilesp, plot.type="barplot", silent=FALSE)
  #length(unique(bilesp@calcdata$taxa_stage)) # 15
  # here creating a vector of length 15 with nice blending colours
	if (requireNamespace("grDevices", quietly = TRUE)) {
	mycolorrampblue <-
			grDevices::colorRampPalette(c("#395B74", "#010F19"))
	mycolorrampyellow <-
			grDevices::colorRampPalette(c("#B59C53", "#271D00"))
	mycolorrampred <-
			grDevices::colorRampPalette(c("#B56F53", "#270B00"))
  color<-c(mycolorrampblue(5),
	  mycolorrampyellow(5),
	  mycolorrampred(5))
  plot(bilesp,plot.type="barplot",color=color,silent=TRUE)
	}
  summary(bilesp)

## End(Not run)	


stacomiR documentation built on May 29, 2024, 10:41 a.m.