Learn R Programming

stacomiR (version 0.6.1)

report_df-class: Report on fishway operation

Description

Fishways (DF) are of various nature, from very simple eel ladders fed by water discharged from the river, to more complex fishways with levels adjusted by the opening of various gates and regulators. The objective of this class is to provide an assessment of the working status of a fishway throughout the year. A number of fishes ascending a fishway has meaning only if we know that the fishway is operational, and that the counting operated on the fishway has remained operational. In the database the operation of the fishway (DF) and counting device (DC) is agregated in one table (t_periodefonctdispositif_per). The column per_etat_fonctionnement indicates whether the fishway is operational (with a boolean) and the column per_tar_code indicates the status of either the fishway or DC. In the database four types of operation are set, "1"=normal operation, "2"=Device stopped in normal operation (ie lift ascending, high tide...), "3"="Stopped for maintenance or other problem", "4"="Works but not fully operational,i.e.flow problem, flood, clogged with debris...", "5"="Not known")

Arguments

Slots

data

A data frame

df

An object of class ref_df-class

horodatedebut

An object of class ref_horodate-class

horodatefin

An object of class ref_horodate-class

Objects from the Class

Objects can be created by calls of the form new("report_df").

Author

Cedric Briand cedric.briand@eptb-vilaine.fr

See Also

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

Examples

Run this code
stacomi(
	database_expected=FALSE)
# An example that will work with the database installed only and schema iav in the database
# prompt for user and password but you can set appropriate options for host, port and dbname

if (FALSE) {
	stacomi(
			database_expected=TRUE, sch='iav')	
	if (interactive()){
		if (!exists("user")){
			user <- readline(prompt="Enter user: ")
			password <- readline(prompt="Enter password: ")	
		}	
	}
	options(					
			stacomiR.dbname = "bd_contmig_nat",
			stacomiR.host ="localhost",
			stacomiR.port = "5432",
			stacomiR.user = user,
			stacomiR.user = password						
	)	
  r_df=new("report_df")
  r_df<-choice_c(r_df,
	  1,
	  horodatedebut="2015-01-01",
	  horodatefin="2015-12-31",
	  silent=TRUE)
  Sys.setenv(TZ='GMT')
  # the times at Arzal are recorded continuously
  # they are converted to date when a time appears while the hour is changing
  # hence the following
  r_df<-connect(r_df)
}

data("r_df")
plot(r_df,plot.type="4")
# the following examples work but take a while to compute
if (FALSE) {
  plot(r_df,plot.type="1")
  plot(r_df,plot.type="2",main="A nice title")
  plot(r_df,plot.type="3",main="A nice title")	
}





Run the code above in your browser using DataLab