report_mig-class

0th

Percentile

Migration report for one DC, one species and one stage

This class performs a migration summary. A migration monitoring operation can correspond to a single horodate (in the case of some video monitoring operation) or comprise a period which does not necessarily span a full day. The daily migration is calculated by splitting the operation between days, and the migration is either grouped or split according to the lenth of the different time spans.

Keywords
classes
Note

In practise, the report_mig class uses methods (calcule, connect...) from the more elaborate report_mig_mult-class

Slots

dc

Object of class ref_dc-class: the control device

taxa

Object of class ref_taxa-class: the species

stage

Object of class ref_stage-class : the stage of the fish

timestep

Object of class ref_timestep_daily-class : the time step constrained to daily value and 365 days

data

Object of class data.frame with data filled in from the connect method

calcdata

A "list" of calculated daily data, one per dc, filled in by the calcule method

coef_conversion

A data.frame of daily weight to number conversion coefficients, filled in by the connect method if any weight are found in the data slot.

time.sequence

Object of class POSIXct : a time sequence of days generated by the calcule method

See Also

Other report.Objects: report_annual-class, report_dc-class, report_df-class, report_env-class, report_ge_weight-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, report_species-class

Aliases
  • report_mig
  • report_mig-class
Examples
library(stacomiR)

stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE) 
## launches the application in the command line
## here an example of loading
## not run as the program is possibly not installed
## this example generates the r_mig dataset

  stacomi(gr_interface=FALSE,
	  login_window=FALSE,
	  database_expected=TRUE)	
  r_mig=new("report_mig")
  r_mig=choice_c(r_mig,
	  dc=5,
	  taxa=c("Liza ramada"),
	  stage=c("IND"),
	  datedebut="2015-01-01",
	  datefin="2015-12-31")
  r_mig<-charge(r_mig)
  # launching charge will also load classes associated with the report
  # e.g. report_ope, report_df, report_dc
  r_mig<-connect(r_mig)
  ########################
# calculations
# note this requires to have a database test configured in postgres for use with sqldf  
  ########################
  r_mig<-calcule(r_mig,silent=TRUE)

########################
# loading data
## use the following to get the raw data loaded by the connect method
# not shown there as the database and program might not be installed
# All three classes report... were created by the charge and connect method 
# of report_mig_mult
# in the previous example
################################
data("r_mig")
data("r_mig_ope")
assign("report_ope",r_mig_ope,envir=envir_stacomi)
data("r_mig_df")
assign("report_df",r_mig_df,envir=envir_stacomi)
data("r_mig_dc")
assign("report_dc",r_mig_dc,envir=envir_stacomi)


#Individual plot for all DC (standard), taxa and stage where data present
#silent argument to stop all messages
plot(r_mig,plot.type="standard",silent=TRUE)
#cumulated migration at the station (all stages and DC grouped)
plot(r_mig,plot.type="step")

# data will be written in the data directory specified in the stacomi/calcmig.csv
#file


  summary(r_mig,silent=TRUE)

# this will write the daily report for later in in the reportnMigrationInterannuelle-class

  write_database(r_mig,silent=TRUE,dbname="bd_contmig_nat",host="localhost",port=5432)

Documentation reproduced from package stacomiR, version 0.5.3, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.