Learn R Programming

⚠️There's a newer version (0.6.1) of this package.Take me there.

stacomiR (version 0.5.4.3)

Fish Migration Monitoring

Description

Graphical outputs and treatment for a database of fish pass monitoring. It is a part of the 'STACOMI' open source project developed in France by the French Office for Biodiversity (OFB) institute to centralize data obtained by fish pass monitoring. This version is available in French and English. See for more information on 'STACOMI'.

Copy Link

Version

Install

install.packages('stacomiR')

Monthly Downloads

192

Version

0.5.4.3

License

GPL (>= 2)

Maintainer

Cedric Briand

Last Published

March 18th, 2020

Functions in stacomiR (0.5.4.3)

calcule,report_mig-method

Transforms migration per period to daily migrations, and performs the conversion from weights to number is data are stored as weights (glass eel).
charge,ref_textbox-method

Loading method for ReTextBox referential objects
charge,ref_coe-method

loads the coefficients for the period defined in class
charge,report_mig_env-method

charge method for report_mig_env class
calcule,report_ge_weight-method

Calcule method for report_ge_weight
charge,ref_taxa-method

Loading method for ref_taxa referential objects
charge,report_mig_interannual-method

loading method for report_mig_interannual class
charge,ref_choice-method

Loading method for Rechoice referential objects
charge

Generic method to load referentials
calcule,report_mig_mult-method

#' Transforms migration per period to daily migrations, and performs the conversion from weights to number is data are stored as weights (glass eel). This calculation is performed in a loop for all dc.
calcule,report_mig_interannual-method

calcule method for report_mig_interannual
barplot,report_annual-method

calcule,report_species-method

calcule method for report_species
calcule,report_silver_eel-method

Calculate individual silver eel parameters.
charge,ref_checkbox-method

Loading method for ref_checkbox referential objects
calcule

Generic method for calculations
calcmig

A data frame containing the default connection arguments. The program will use a file installed in c:/program files/stacomi but if not found will switch to this default value
charge,ref_year-method

Loading method for ref_year referential objects
charge_complement,ref_parqual-method

Loads an additional dataset this method is loaded to obtain the possible values of a qualitative parameter. Here data only contains one line
charge,ref_parquan-method

Loading method for Reparquan referential objects
charge_with_filter,ref_par-method

Loading method for Repar referential objects searching only those parameters existing for a DC, a Taxa, and a stage
charge_complement

Generic method to load additional data
charge,ref_stage-method

Loading method for ref_stage referential objects
charge,report_sea_age-method

Loads data and check that all choices in the graphical interface have been made.
calcule,report_mig_char-method

Computes data to a standard format for the summary and plot methods.
charge,report_sample_char-method

charge method for report_sample_char class
calcule,report_sample_char-method

Calculation for report_sample_char
charge,report_annual-method

charge method for report_annual class
choice,ref_choice-method

Choice method for Rechoice referential objects
charge,report_env-method

charge method for report_env class
charge,ref_list-method

Loading method for refliste referential objects
charge,ref_env-method

Loading method for ref_env referential object
calcule,report_sea_age-method

calcule,report_mig_env-method

charge,ref_df-method

Loading method for DF referential objects
charge,ref_dc-method

Method to load the counting devices of the control station
charge,ref_par-method

Loading method for Repar referential objects
choice_c,ref_textbox-method

Choice_c method for ReTextBox referential objects
choice,ref_horodate-method

Graphical interface
charge,ref_parqual-method

Loading method for Reparqual referential objects
choice,ref_stage-method

Choice method for ref_stage referential objects
choice_c,ref_year-method

choice_c method for ref_year referential from the command line
choice_c,ref_timestep_daily-method

choice_c method for class ref_timestep_daily
choice_c,report_annual-method

charge,report_mig_mult-method

charge method for report_mig_mult
choice,ref_taxa-method

Choice method for reftaxa referential objects with only one taxa selected
choice,ref_dc-method

Graphical method to choose a fishway through the interface
charge,report_dc-method

charge method for report_dc
choice_c,ref_stage-method

choice_c method for ref_stage
charge_with_filter,ref_parqual-method

Loading method for Reparqual referential objects searching only those parameters existing for a DC, a Taxon, and a stage
charge,report_ope-method

charge method for report_ope
charge,report_df-method

charge method for report_df
choice,ref_year-method

choice method for ref_year referential
choice_c,report_mig_mult-method

command line interface for report_mig_mult class
choice,ref_list-method

Choice method for ref_list referential objects
choice,ref_timestep_daily-method

Method to select timesteps from the graphical interface
charge,report_ge_weight-method

charge method for report_ge_weight class
colortable

Builds a table with colors to merge with a dataframe for later use in ggplot. An initial check will be done on the name of the color vector. A data frame is built. It contains a column color which is a factor. The factor order match the order of the vector (not the alphabetical order of the colors).
choice_c

Generic method for manual choice using the command line
connect,report_mig-method

connect method for report_mig
connect,report_mig_char-method

connect method for report_mig_char
choice_c,report_dc-method

command line interface for report_dc class
choice_c,report_species-method

choice_c,ref_taxa-method

choice_c method for ref_taxa
choice_c,report_df-method

command line interface for report_df class
connect,report_annual-method

connect method for report_annual class this method performs the sum over the year attention this function does not count subsamples.
charge,report_mig-method

Loads additional data on migration control operations, df (fishway) dc (counting device).
charge_with_filter,ref_parquan-method

Loading method for Reparquan referential objects searching only those parameters existing for a DC, a Taxon, and a stage
choice,ref_env-method

Choice method for ref_env referential object
choice_c,ref_choice-method

Choice_c method for refchoix referential objects
choice_c,ref_horodate-method

Command line
choice_c,ref_env-method

Command line interface to select a monitoring station
choice

Generic method for choice (using the gwidget graphical interface)
fun_date_extraction

This function extracts temporal characteristics from a dataframe
fun_report_mig_interannual

statistics per time period
currentstart_date,ref_timestep-method

choice,ref_df-method

Graphical method to choose a fishway through the interface
choice_c,report_mig_env-method

command line interface for report_env class
funbarchart1DC

Handler for barchart for report_df class from the graphical interface
current_end_date

Generic method for getting the ending date for current time step
charge,report_silver_eel-method

charge method for report_silver_eel class
charge_with_filter,ref_stage-method

Loading method for ref_stage referential objects searching only those stages existing for a DC and a Taxon
choice_c,report_mig_interannual-method

command line interface for report_mig_interannual class
chargecomplement-methods

Methods for Function chargecomplement
choice_c,report_sample_char-method

command line interface for report_sample_char class
choice,ref_parqual-method

Choice method for ref_parqual referential objects, internal use
choice_c,report_sea_age-method

command line interface for report_sea_age class
connect,report_dc-method

connect method for report_dc
charge,report_species-method

charge method for report_species
choice_c,ref_dc-method

Command line interface to select a counting device
choice,ref_par-method

Choice method for ref_par referential objects
connect,report_df-method

connect method for report_df
choice_c,report_mig-method

command line interface for report_mig class
charge,report_mig_char-method

charge method for report_mig_char
charge_with_filter,ref_taxa-method

Loading method for ref_taxa referential objects searching only taxa existing for a DC
choice_c,ref_df-method

Command line interface to choose a fishway
choice_c,report_silver_eel-method

command line interface for report_silver_eel class
charge_with_filter

Generic method to load referentials, with filters from the parent object in the database
choice_c,report_mig_char-method

command line interface for report_mig_char class
funout

this function uses gfile, edits a text with info and changing colors
funplotreport_sea_age

funplotreport_sea_age
funbarchart1DF

Handler for barchart for report_df class from the graphical interface
connect,report_ope-method

connect method for report_ope
connect,report_mig_mult-method

connect method for report_mig_mult
choicemult,ref_taxa-method

Multiple Choice method for reftaxa referential objects, the graphical interface is built to allow for multiple choices. See load for method in the command line.
connect,report_env-method

connect method for report_env class
funtablereport_silver_eel

table function
connect,report_ge_weight-method

connect method for report_Poids_moyen
choicemult,ref_timestep-method

Graphical interface for multiple choice method for PasdeTemps (used in report_mig_mult)
fun_weight_conversion

returns a table where weights and number are calculated from number and weights respectively performs a query to collect the conversion coefficients
fun_write_monthly

This writes monthly data in t_reportmensuel_mens table
chargecsv

chargecsv loads the informations stored in c:/program files/stacomi/calcmig.csv file
choicemult,ref_horodate-method

Multiple Choice method for ref_horodate referential objects, to put together with notebook widgets
funchartDC

Handler function to plot calendar like graph, internal use
envir_stacomi

Environment where most objects from the package are stored and then loaded by the charge method
fun_aggreg_for_plot

returns a table where all components within the list calcdata are aggregated and formatted for plot
funtable

function to print and save statistics in .csv and .html formats for report_mig and report_mig_mult class
choicemult

Generic method for multiple choice (using the gwidget notebook for multiple choice)
end_date

Generic method for getting the final date
currentstart_date

Generic method for getting the beginning date for current time step
fun_char_spe

function used to remove special non utf8 character which cause the gtk interface to crash
end_date,ref_timestep-method

getvalue,ref_period-method

Returns the POSIXt value of a given name
choicemult,ref_par-method

Multiple Choice method for ref_par referential objects, internal use
choice,ref_checkbox-method

Choice method for ref_checkbox referential objects
coef_durif

Silvering index coefficients from Caroline Durif (2009) to predict silvering stage from morphological parameters
getvalue

Generic method getvalue
connect,report_sample_char-method

connect method for report_sample_char
funboxplotreport_sample_char

Boxplots for ggplot2
get_step_label,ref_timestep-method

Gets the string value of time step
connect,report_sea_age-method

connect method for report_sea_age
funtableDC

FuntableDC create a table output for report_dc class
funtableDF

Table output for report_df class
funtablereport_ge_weight

funchartDF

Handler function to plot calendar like graph, internal use
h_report_envgraph

h_report_envgraph Internal method
getdbname

Retrieves the dbname from a connection using "baseODBC"
funstat_daily

function to create daily statistics
funstat

Function to calculate statistics per month
funtablereport_sample_char

table function
getdateDebut

Generic method the get starting date
createmessage

Generic method to forward outputs
fundensityreport_sample_char

fundensityreport_sample_char uses ggplot2 to draw density plots
funtablereport_sea_age

table function
current_end_date,ref_timestep-method

h_report_ge_weight

handler function used by the main interface
h_report_mig_mult_graph

handler for plot method in report_mig_mult class
h_report_mig_multcalc

handler for calculations
houtDF

handler to print the command line
interface_report_annual

interface for report_annual class
h_report_size

handler function used by the main interface
hbmmCEgraph

internal method for graphical interface
houtDC

handler to print the command line
plot,report_annual,missing-method

Plot method for report_annual
model

Generic for prediction
hbmmCEcalc

Internal handler function
interface_report_dc

interface for report_dc class
interface_report_sea_age

An interface that calls the object to build the user interface
fun_report_mig_mult

Calculate daily migration by simple repartition
choice_c,ref_list-method

Choice_c method for ref_list referential objects
choice,ref_textbox-method

Choice method for ReTextBox referential objects
h_report_silver

handler function used by the main interface
h_report_dc

handler function used by the main interface
fun_report_mig_mult_overlaps

Function to calculate daily migration using overlaps functions
plot,report_mig_mult,missing-method

Plots of various type for report_mig_mult
interface_report_sample_char

An interface that calls the object to build the user interface
choice,ref_timestep-method

Method to select timesteps from the graphical interface
choice_c,ref_par-method

Command line interface to select a parameter
funbarchartDC

Function to create a barchart (lattice) corresponding to the periods
hgraph_report_mig_interannual

Plot of all interannual from top to bottom
h_report_mig_multgraph3

handler
plot,report_sample_char,missing-method

Plots of various type for reportcarlot
h_report_sea_age

handler function used by the main interface
h_report_mig_multgraph2

handler du calcul h_report_miggraph2
h_report_sample_char

handler function used by the main interface
choice_c,report_env-method

command line interface for report_env class
h_report_df

handler function used by the main interface
funbarchartDF

Handler for barchart for report_df class from the graphical interface
choice_c,report_ge_weight-method

hgraph_report_mig_interannual2

Plot of daily migrations
getnocurrent_step

Generic method to get current time step
getnocurrent_step,ref_timestep-method

hplot

funplotreport_silver_eel

funplotreport_silver_eel
ref_choice-class

Class "ref_choice"
get_year

Generic method to get the years
r_mig_dc

Counting device operation for the video recording (Arzal dam, Vilaine, France).
h_report_mig_char

handler function used by the main interface
funpointreport_sample_char

Point graph from ggplot
choicemult,ref_choice-method

Multiple Choice method for ref_choice referential objects, to put together with notebook widgets
r_dc

Counting Device (DC) operation from 2000 to 2015 at the Arzal dam (Vilaine, France)
hplotbilesp

handler for plot internal use
interface_report_df

interface for report_df class
r_df

Overview of the fishway operation at Arzal in (Vilaine France).
r_mig_df

Fishway operation for the vertical slot fishway (Arzal dam, Vilaine, France).
ref_list-class

Class "ref_list"
interface_report_silver_eel

An interface that calls the object to build the user interface
getdateDebut,ref_timestep-method

Returns the starting date as character
ref_taxa-class

Class "ref_taxa"
ref_coe-class

Class "ref_coe"
choicemult,ref_dc-method

choicemult, selection method for ref_dc allowing to select several DC
ref_textbox-class

ref_textbox referencial class
hTablereport_mig

handler for summary function, internal use calls functions funstat and funtable to build summary tables in html and csv files
interface_report_env

Interface for class conditionEnv
h_report_mig_env

handler function used by the main interface
ref_par-class

Class "ref_par"
h_report_miggraph

handler for h_report_miggraph
h_report_species

handler function used by the main interface
hcalc

hbarplotreport_annual

Barplot handler
connect,report_mig_env-method

connect method for report_mig_env class
choicemult,ref_parqual-method

Multiple Choice method for ref_parqual referential objects internal use
interface_report_species

Interface for report_species class
choicemult,ref_stage-method

Multiple Choice method for ref_stage referential objects
plot,report_dc,ANY-method

Different plots for report_dc
h_report_migcalc

handler for calculations report_mig
hexp

connect,report_mig_interannual-method

connect method for report_mig_interannual
plot,report_df,ANY-method

Different plots for report_df
hTablereport_mig_mult

handler function table
hgraph_report_mig_interannual3

Step plot with different years displayed on the same graph. One year can be highlighted against the others
setasqualitative

Generic method to transform quantitative par into a qualitative one
print,report_mig-method

Method to print the command line of the object
print,report_df-method

Method to print the command line of the object
report_mig_mult-class

Migration reports for multiple DC / species / stages
print,report_sea_age-method

Method to print the command line of the object
hgraph_report_mig_interannual4

Plot comparing the migration to the migration computed for all years available in the daily migration table. This function plots comparisons for periods of 1 week, 2 weeks, month
report_mig_interannual-class

Class "report_mig_interannual"
print,report_silver_eel-method

Method to print the command line of the object
h_report_mig

handler function used by the main interface
summary,report_mig-method

summary for report_mig calls functions funstat and funtable to create migration overviews and generate csv and html output in the user data directory
h_report_mig_annual

handler function used by the main interface
r_mig_interannual_vichy

Seasonality of salmon migration at the Vichy counting station (Loire)
setref_horodate,ref_horodate-method

Method to set the Horodate
interface_report_mig

Interface for report_mig class, internal use, this function is called by a handler in the main graphical interface
model,report_ge_weight-method

model method for report_ge_weight' this method uses samples collected over the season to model the variation in weight of glass eel or yellow eels.
connect,report_silver_eel-method

connect method for report_silver_eel
hplotreport_annual

plot handler
interface_report_ge_weight

interface for report_ge_weight class
hreg

plot,report_mig_env,missing-method

Plot method for report_mig_env
load_stacomi

Internal function, tests the connection and if it works loads the stacomi interface
summary,report_mig_char-method

summary for report_mig_char
validity_year

Validity check for ref_year
h_report_miggraph2

handler for h_report_miggraph2
connect,report_species-method

connect method for report_species
h_report_migwrite

handler h_report_migwrite Allows the saving of daily and monthly counts in the database
h_report_ope

handler function used by the main interface
validity_ref_horodate

Validity check for ref_horodate
fun_stage_durif

Function to calculate the stages from Durif
fun_table_per_dis

functions called in DF and DC
r_mig_mult_ope

Counting operations for three different counting device in Arzal (Vilaine, France)
funboxDC

function used for some lattice graph
r_mig_mult

Anguilla migration at the Arzal station (report_mig_mult-class)
hbmCplotqual

handler for plot
h_report_pigment_stages

handler function used by the main interface
hbmCplotcrossed

handler for plot
ref_timestep-class

Class "ref_timestep"
ref_horodate-class

Class ref_horodate
r_mig_ope

ref_env-class

Class "ref_env"
funboxDF

Internal use, rectangles to describe the DF work for report_df class, graphical interface handler
plot,report_mig_interannual,missing-method

Plot method for report_mig_interannual
report_ope-class

Report on operations
houtreport_mig

handler to print the command line
progress_bar

Progress bar using a gtkdialog, the progress bar is assigned in envir_stacomi This progress bar has a button to close.
quitte

function used to clean the objects within the group and the graphs and also elements remaining in the envir_stacomi environment
houtreport_mig_mult

handler to print the command line
stacomiR-package

stacomiR
stacomi_installed

Test that the program is installed.
report_sample_char-class

Class "report_sample_char"
fungraph

Function for report_mig graphs including numbers DF DC operations
hsummaryreport_migInterannuelle

Summary handler internal method
hsummarybilesp

handler for summary report_species, internal use
ref_timestepChar-class

Class "ref_timestepChar"
r_mig

Video counting of thin lipped mullet (Liza ramada) in 2015 in the Vilaine (France)
r_mig_char

Qualitative and quantitative parameters describing Salmon migration at Decize (Loire)
get_step_label

Generic method to get the string value of time step
fungraph_glasseel

Graph function for glass eel migration. Differs from fungraph as it does not draw the ggplot graph for month
interface_report_mig_interannual

interface for report_mig_interannual class
get_year,ref_timestep-method

Gets the year or a vector of years corresponding to the timestep ("ref_timestep") object
plot,report_mig,ANY-method

Plots of various type for report_mig.
plot,report_mig_char,missing-method

plot method for report_mig_char
print,report_dc-method

Method to print the command line of the object
plot,report_species,missing-method

Plot method for report_species
r_ann

Annual migration of yellow and silver eel for three fishways / counting devices at the Arzal dam (data from 1995 to 2016)
r_mig_env

An object of class report_mig_env with data loaded
summary,report_sample_char-method

summary for report_sample_char
summary,report_sea_age-method

summary for report_sea_age
r_mig_interannual

Daily glass eel and elver migration from 1984 to 2016 in the Sevre Niortaise
vector_to_listsql

Transforms a vector into a string called within an sql command e.g. c('A','B','C') => in ('A','B','C')
graphdate

function used for some lattice graphs with dates
r_silver

Silver eel migration in the Somme
r_ann_adour

Annual migration of salmon in the Adour and tributaries
write_database,report_ge_weight-method

interface_report_mig_mult

graphical interface for report_mig_mult class
ref_checkbox-class

ref_checkbox referencial class
r_sample_char

Size of yellow and glass eel at the Arzal dam (Vilaine, France) in the fishway and main eel trapping ladder.
r_seaa

An object of class report_sea_age with data loaded
ref_period-class

Class "ref_period" referential class
ref_parqual-class

Class "ref_parqual"
ref_stage-class

Class "ref_stage"
report_sea_age-class

Class "report_sea_age"
split_per_day

Create a dataframe suitable for charts per 24h and day
h_report_dfdc

handler function used by the main interface
ref_timestep_daily-class

Class "ref_timestep_daily"
h_report_mig_interannual

handler function used by the main interface
stacomi

Function that loads the loginwindow, tests connection, and then destroys the window
summary,report_silver_eel-method

summary for report_silver_eel
h_report_mig_mult

handler function used by the main interface
hbilespcalc

handler for calculation
report_silver_eel-class

Class "report_silver_eel"
ref_parquan-class

Class "ref_parquan"
graphe-methods

Methods for Function graphe
summary,report_species-method

summary for report_species generate csv and html output in the user data directory
h_report_env

handler function used by the main interface
hbmCplotquan

handler for plot
report_env-class

class report_env simple output of one or several environmental conditions...
supprime,report_sea_age-method

supprime method for report_mig_interannual class
supprime

Generic method to delete entires from the database
hbmCstat

This handler calls the generic method stat
ref_year-class

Year reference class
report_df-class

Report on fishway operation
hbmCcalc

handler for report_mig_char
write_database

Generic method write_database
summary,report_dc-method

summary for report_dc, write csv and html output, and prints summary statistics
setasqualitative,report_mig_char-method

Turns a quantitative parameter into qualitative
report_mig-class

Migration report for one DC, one species and one stage
report_ge_weight-class

Trend of wet weight in glass eel
summary,report_df-method

summary for report_df, write csv and html output, and prints summary statistics
set_starting_date

Generic method to set the starting date
xtable,report_annual-method

xtable function for report_annual-class create an xtable objet but also assigns an add.to.column argument in envir_stacomi, for later use by the print.xtable method.
write_database,report_mig-method

Command line method to write the daily and monthly counts to the t_bilanmigrationjournalier_bjo table
write_database,report_sea_age-method

Command line method to write the characteristic "sea age" (car_par_code='A124') into the tj_caracteristiquelot_car table in the user's scheme
hgraph_report_mig_interannual5

Function displaying comparison similar to hgraph_report_mig_interannual4 but using pointrange and geom_bar This function plots comparisons for periods of 1 week, 2 weeks, month
hgraph_report_mig_interannual7

This function creates a cumulated area plot to highlight seasonal trends in migration. Data are calculated by 2 weeks period then centered and reduced
plot,report_env,missing-method

Plot method for report_env
plot,report_ge_weight,missing-method

Plot method for report_ge_weight'
hxtablereport_annual

xtable handler
plot,report_sea_age,missing-method

Plots of various type for report_sea_age
plot,report_silver_eel,missing-method

Plots of various type for report_silver_eel
print,report_mig_mult-method

Method to print the command line of the object
interface_graphique

Program launch, this function launches the GwidgetRgtk graphical interface to stacomi. To be able to run, some widgets (win, grouptotal, group...) are assigned in the user environment .GlobalEnv.
print,report_sample_char-method

Method to print the command line of the object
interface_report_mig_char

interface for report_migPar class
ref_df-class

Class "ref_df"
report_annual-class

Class "report_annual"
report_mig_char-class

Migration report along with quantitative and qualitative characteristics
ref_dc-class

Class "ref_dc"
report_mig_env-class

Class "report_mig_env"
report_species-class

Counts of number per taxa/stages
summary,report_mig_interannual-method

summary for report_mig_interannual provides summary statistics for the latest year (if silent=TRUE), or the year selected in the interface, if silent=FALSE. Mean, min and max are historical statistics with the selected year excluded from the historical dataset.
summary,report_mig_mult-method

summary for report_mig_mult calls functions funstat and funtable to create migration overviews and generate csv and html output in the user data directory
report_dc-class

Class "report_dc" report du fonctionnement du dispositif de comptage
supprime,ref_coe-method

supprime method for "ref_coe" class
supprime,report_mig_interannual-method

supprime method for report_mig_interannual class
xtable,report_mig_char-method

xtable function for report_mig_char-class create an xtable objet to be later used by the print.xtable method.
r_mig_mult_dc

Counting device operation for three different counting device in Arzal (Vilaine, France)
r_gew

Wet weight of glass eel from the trapping ladder (Arzal, Vilaine France)
r_mig_mult_df

Fishway operation at the Arzal Dam (Vilaine France) (3 Fishways in 2011)
interface_report_mig_env

interface for report_migConditionEnv class
set_starting_date,ref_timestep-method

Sets starting date from a character
r_env

An object of class report_env with data loaded