[Stacomir-commits] r453 - pkg/stacomir

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Aug 30 18:25:56 CEST 2017


Author: briand
Date: 2017-08-30 18:25:55 +0200 (Wed, 30 Aug 2017)
New Revision: 453

Modified:
   pkg/stacomir/README.Rmd
   pkg/stacomir/README.md
Log:
wrting examples in README.Rmd

Modified: pkg/stacomir/README.Rmd
===================================================================
--- pkg/stacomir/README.Rmd	2017-08-30 15:37:14 UTC (rev 452)
+++ pkg/stacomir/README.Rmd	2017-08-30 16:25:55 UTC (rev 453)
@@ -31,7 +31,7 @@
 of the stacomi project is to provide a common database for people monitoring
 fish migration, so that data from watershed are shared, and stocks exchanging
 between different basins are better managed. The stacomi database, is an
-open-source database, it managed with a JAVA interface,and results from that
+open-source database, it managed with a JAVA interface, and results from that
 database are treated directly with the stacomiR project.
 
 
@@ -41,7 +41,7 @@
 The package is available from CRAN, a development version is available from
 R-Forge.
 
-```{r install, eval=FALSE}
+```{r , eval=FALSE}
 install.packages("stacomiR", repos="http://R-Forge.R-project.org")
 ```
 
@@ -50,20 +50,21 @@
 
 Launch the graphical interface
 
-```{r example1, eval=FALSE}
-stacomi(gr_interface = TRUE, login_window = TRUE, database_expected = TRUE)
+```{r , eval=FALSE}
+stacomi()
 ```
 
 The program can be launched to use from the command line
 
-```{r example2, eval=FALSE}
-stacomi(gr_interface = TRUE, login_window = TRUE, database_expected = FALSE)
+```{r , eval=FALSE}
+stacomi(gr_interface = FALSE, login_window = TRUE, database_expected = TRUE)
 ```
 
 
 Data structure
 -------------------    
 The open source postgresql database was built on the following concepts.
+*Contact the authors to get a copy of the database*.
 
 ### Infrastructure
 A migration report is always built on a section of a river. However, dam and
@@ -90,9 +91,9 @@
 * etc.
 
 #### Crossing device   
-A crossing device is a passageway that allows and concentrates the migratory
-flow between upstream and downstream of a weir. We can have several types like
-:
+A crossing device (DF) is a passageway that allows and concentrates the
+migratory flow between upstream and downstream sections of a weir. They can be
+of various type
 * fishway, 
 * spillway, 
 * fish elevator, 
@@ -101,8 +102,8 @@
 It is possible to have more than one crossing device on a same weir.
 
 #### Counting device
-A couting device is a set of equipment installed on a crossing devise used to
-monitor the migratory flow that passes through it.
+A couting device (DC) is a set of equipment installed on a crossing devise 
+to monitor fish migration.
 It can be :
 * a video counting device, 
 * a trap pass, 
@@ -141,6 +142,7 @@
 * starting date The date of beginning
 * ending date The last date of the report
 ***
+
 | Class         | Report type    | description| 
 | ------------- |:----------| ---------------------------------: | 
 |report_mig    | Annual migration | Annual migration report  | 
@@ -151,10 +153,89 @@
 Working examples
 -------------------------
 
-###        Interface
-
 ###        Command line
 
+Examples are provided with each of the class, you can access them simply by
+typing `? report_mig_mult`
+The program is intented to be used in conjuntion with the database, to test it
+without access, use the arguments `login_windows=FALSE` and
+`database_expected=FALSE`
+
+ ```{r , eval=TRUE, echo=TRUE}
+## launches the application in the command line without connection to the database
+stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE) 
+```
+The
+following code is only run when there is a connection to the database. The
+program will create an object of the class report_mig_mult, and run it for several DC, here 5 is a
+vertical slot fishway, and 6 and 12 are two glass eel trapping ladder located
+at the Arzal dam in the
+Vilaine river (France).
+We are evaluating the migration
+of all stages of eel (glass eel CIV, yellow eel AGJ and silver eel AGJ).
+Glass
+eel and yellow eel migrate to the watershed while silver eel
+are migrating back
+to the ocean.
+Data are loaded from the database with the `charge` method and the `calcule`
+method
+will
+interpolate
+daily
+migration from monitoring operations which do not necessarily span a day, and convert the glass eel
+weight in numbers.
+ ```{r ,eval=FALSE,echo=TRUE}
+   stacomi(gr_interface=FALSE,
+	  login_window=FALSE,
+	  database_expected=TRUE)	
+  r_mig_mult=new("report_mig_mult")
+  r_mig_mult=choice_c(r_mig_mult,
+	  dc=c(5,6,12),
+	  taxa=c("Anguilla anguilla"),
+	  stage=c("AGG","AGJ","CIV"),
+      datedebut="2011-01-01",
+      datefin="2011-12-31")
+  r_mig_mult<-charge(r_mig_mult)
+  # launching charge will also load classes associated with the report
+  # e.g. report_ope, report_df, report_dc
+  r_mig_mult<-connect(r_mig_mult)
+  # calculations 
+  r_mig_mult<-calcule(r_mig_mult,silent=TRUE)
+```
+The previous line generates data not only about the report_mig_mult class,
+but also describing how the fishway (DF) and counting devices (DC) have been operated.
+Sometimes there is no migration but only because the camera was jammed. There are also information
+about the operations (e.g. periods at wich a trap content has been evaluated). Here we load what
+would have been generated if we had run the previous lines.
+
+ ```{r ,eval=TRUE,echo=TRUE}
+data("r_mig_mult")
+data("r_mig_mult_ope")
+assign("report_ope",r_mig_mult_ope,envir=envir_stacomi)
+data("r_mig_mult_df")
+assign("report_df",r_mig_mult_df,envir=envir_stacomi)
+data("r_mig_mult_dc")
+assign("report_dc",r_mig_mult_dc,envir=envir_stacomi)
+r_mig_mult<-calcule(r_mig_mult,silent=TRUE)
+```
+
+Individual plot for all DC, taxa and stage where data present
+Silent=TRUE to turn off messages
+
+
+```{r rmmmult,eval=TRUE,echo=FALSE,fig.keep="all"}
+  plot(r_mig_mult,plot.type="multiple",silent=TRUE)
+```
+Ci dessous ne marche pas générer à la main puis expliquer et lien
+```{r rmmstd,eval=TRUE,echo=FALSE,fig.keep="last"}
+  plot(r_mig_mult,plot.type="standard",silent=TRUE)
+```
+![plot of chunk rmmmult](man/figures/README-rmmstd-1.png)
+
+
+### R-GTK2 graphical interface
+
+
 License
 -------
 

Modified: pkg/stacomir/README.md
===================================================================
--- pkg/stacomir/README.md	2017-08-30 15:37:14 UTC (rev 452)
+++ pkg/stacomir/README.md	2017-08-30 16:25:55 UTC (rev 453)
@@ -22,7 +22,7 @@
 of the stacomi project is to provide a common database for people monitoring
 fish migration, so that data from watershed are shared, and stocks exchanging
 between different basins are better managed. The stacomi database, is an
-open-source database, it managed with a JAVA interface,and results from that
+open-source database, it managed with a JAVA interface, and results from that
 database are treated directly with the stacomiR project.
 
 
@@ -44,20 +44,21 @@
 
 
 ```r
-stacomi(gr_interface = TRUE, login_window = TRUE, database_expected = TRUE)
+stacomi()
 ```
 
 The program can be launched to use from the command line
 
 
 ```r
-stacomi(gr_interface = TRUE, login_window = TRUE, database_expected = FALSE)
+stacomi(gr_interface = FALSE, login_window = TRUE, database_expected = TRUE)
 ```
 
 
 Data structure
 -------------------    
 The open source postgresql database was built on the following concepts.
+*Contact the authors to get a copy of the database*.
 
 ### Infrastructure
 A migration report is always built on a section of a river. However, dam and
@@ -84,9 +85,9 @@
 * etc.
 
 #### Crossing device   
-A crossing device is a passageway that allows and concentrates the migratory
-flow between upstream and downstream of a weir. We can have several types like
-:
+A crossing device (DF) is a passageway that allows and concentrates the
+migratory flow between upstream and downstream sections of a weir. They can be
+of various type
 * fishway, 
 * spillway, 
 * fish elevator, 
@@ -95,8 +96,8 @@
 It is possible to have more than one crossing device on a same weir.
 
 #### Counting device
-A couting device is a set of equipment installed on a crossing devise used to
-monitor the migratory flow that passes through it.
+A couting device (DC) is a set of equipment installed on a crossing devise 
+to monitor fish migration.
 It can be :
 * a video counting device, 
 * a trap pass, 
@@ -135,6 +136,7 @@
 * starting date The date of beginning
 * ending date The last date of the report
 ***
+
 | Class         | Report type    | description| 
 | ------------- |:----------| ---------------------------------: | 
 |report_mig    | Annual migration | Annual migration report  | 
@@ -145,10 +147,88 @@
 Working examples
 -------------------------
 
-###        Interface
-
 ###        Command line
 
+Examples are provided with each of the class, you can access them simply by
+typing `? report_mig_mult`
+The program is intented to be used in conjuntion with the database, to test it
+without access, use the arguments `login_windows=FALSE` and
+`database_expected=FALSE`
+
+ 
+ ```r
+ ## launches the application in the command line without connection to the database
+ stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE) 
+ ```
+The
+following code is only run when there is a connection to the database. The
+program will create an object of the class report_mig_mult, and run it for several DC, here 5 is a
+vertical slot fishway, and 6 and 12 are two glass eel trapping ladder located
+at the Arzal dam in the
+Vilaine river (France).
+We are evaluating the migration
+of all stages of eel (glass eel CIV, yellow eel AGJ and silver eel AGJ).
+Glass
+eel and yellow eel migrate to the watershed while silver eel
+are migrating back
+to the ocean.
+Data are loaded from the database with the `charge` method and the `calcule`
+method
+will
+interpolate
+daily
+migration from monitoring operations which do not necessarily span a day, and convert the glass eel
+weight in numbers.
+ 
+ ```r
+   stacomi(gr_interface=FALSE,
+ 	  login_window=FALSE,
+ 	  database_expected=TRUE)	
+  r_mig_mult=new("report_mig_mult")
+  r_mig_mult=choice_c(r_mig_mult,
+ 	  dc=c(5,6,12),
+ 	  taxa=c("Anguilla anguilla"),
+ 	  stage=c("AGG","AGJ","CIV"),
+      datedebut="2011-01-01",
+      datefin="2011-12-31")
+  r_mig_mult<-charge(r_mig_mult)
+  # launching charge will also load classes associated with the report
+  # e.g. report_ope, report_df, report_dc
+  r_mig_mult<-connect(r_mig_mult)
+  # calculations 
+  r_mig_mult<-calcule(r_mig_mult,silent=TRUE)
+ ```
+The previous line generates data not only about the report_mig_mult class,
+but also describing how the fishway (DF) and counting devices (DC) have been operated.
+Sometimes there is no migration but only because the camera was jammed. There are also information
+about the operations (e.g. periods at wich a trap content has been evaluated). Here we load what
+would have been generated if we had run the previous lines.
+
+ 
+ ```r
+ data("r_mig_mult")
+ data("r_mig_mult_ope")
+ assign("report_ope",r_mig_mult_ope,envir=envir_stacomi)
+ data("r_mig_mult_df")
+ assign("report_df",r_mig_mult_df,envir=envir_stacomi)
+ data("r_mig_mult_dc")
+ assign("report_dc",r_mig_mult_dc,envir=envir_stacomi)
+ r_mig_mult<-calcule(r_mig_mult,silent=TRUE)
+ ```
+
+Individual plot for all DC, taxa and stage where data present
+Silent=TRUE to turn off messages
+
+
+![plot of chunk rmmmult](man/figures/README-rmmmult-1.png)
+Ci dessous ne marche pas générer à la main puis expliquer et lien
+
+![plot of chunk rmmmult](man/figures/README-rmmstd-1.png)
+
+
+### R-GTK2 graphical interface
+
+
 License
 -------
 



More information about the Stacomir-commits mailing list