[Stacomir-commits] r357 - in pkg/stacomir: R inst/examples inst/tests/testthat man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon May 8 15:37:08 CEST 2017
Author: briand
Date: 2017-05-08 15:37:07 +0200 (Mon, 08 May 2017)
New Revision: 357
Modified:
pkg/stacomir/R/BilanMigration.r
pkg/stacomir/R/BilanMigrationInterAnnuelle.r
pkg/stacomir/inst/examples/bilanMigrationInterannuelle_example.R
pkg/stacomir/inst/tests/testthat/test-06Bilan_MigrationInterAnnuelle.R
pkg/stacomir/man/BilanMigrationInterAnnuelle-class.Rd
pkg/stacomir/man/calcule-BilanMigration-method.Rd
pkg/stacomir/man/charge-BilanMigration-method.Rd
pkg/stacomir/man/choice_c-BilanMigration-method.Rd
pkg/stacomir/man/connect-BilanMigration-method.Rd
pkg/stacomir/man/plot-BilanMigration-ANY-method.Rd
pkg/stacomir/man/print-BilanMigration-method.Rd
pkg/stacomir/man/summary-BilanMigration-method.Rd
Log:
color argument for BilanMigration and cleaning testthat
Modified: pkg/stacomir/R/BilanMigration.r
===================================================================
--- pkg/stacomir/R/BilanMigration.r 2017-05-08 06:58:19 UTC (rev 356)
+++ pkg/stacomir/R/BilanMigration.r 2017-05-08 13:37:07 UTC (rev 357)
@@ -75,6 +75,7 @@
#' @param object An object of class \link{BilanMigration-class}
#' @param silent Boolean default FALSE, if TRUE information messages not displayed
#' @return BilanMigration with slot @data filled from the database
+#' @aliases connect.bilanmigration
#' @export
setMethod("connect",signature=signature("BilanMigration"),definition=function(object,silent=FALSE){
bilanMigration<-object
@@ -96,6 +97,7 @@
#' The choice_c method fills in the data slot for RefDC, RefTaxon, RefStades, and RefPasDeTempsJournalier and then
#' uses the choice_c methods of these object to select the data.
#' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
+#' @aliases choice_c.bilanmigration
#' @export
setMethod("choice_c",signature=signature("BilanMigration"),definition=function(object,dc,taxons,stades,datedebut,datefin){
# code for debug using bM_Arzal example
@@ -122,6 +124,7 @@
#' @param silent Should the program be returning messages
#' @return An object of class \link{BilanMigration-class} with slots filled by user choice
#' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
+#' @aliases charge.bilanmigration
#' @export
setMethod("charge",signature=signature("BilanMigration"),definition=function(object,silent=FALSE){
bilanMigration<-object
@@ -201,6 +204,7 @@
#' @note The class BilanMigration does not handle escapement rates nor
#' 'devenir' i.e. the destination of the fishes.
#' @return BilanMigration with calcdata slot filled.
+#' @aliases calcule.bilanmigration
#' @export
setMethod("calcule",signature=signature("BilanMigration"),definition=function(object,negative=FALSE,silent=FALSE){
#bilanMigration<-bM_Arzal
@@ -307,6 +311,7 @@
#' @param ... Additional parameters passed to print
#' @return NULL
#' @author cedric.briand
+#' @aliases print.bilanmigration
#' @export
setMethod("print",signature=signature("BilanMigration"),definition=function(x,...){
sortie1<-"bilanMigration=new('BilanMigration');"
@@ -342,8 +347,9 @@
#' @param color_ope Default NULL, argument passed for the plot.type="standard" method. A vector of color for the operations. Default to brewer.pal(4,"Paired")
#' @param ... Additional arguments passed to matplot or plot if plot.type="standard", see ... in \link{fungraph_civelle} and \link{fungraph}
#' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
+#' @aliases plot.bilanmigration
#' @export
-setMethod("plot",signature(x = "BilanMigration", y = "ANY"),definition=function(x, y,plot.type="standard",silent=FALSE,...){
+setMethod("plot",signature(x = "BilanMigration", y = "ANY"),definition=function(x, y,plot.type="standard",color=NULL, color_ope=NULL,silent=FALSE,...){
#bilanMigration<-bM_Arzal
#bilanMigration<-x
if (exists("bilanMigration",envir_stacomi)) {
@@ -530,6 +536,7 @@
#' @param silent Should the program stay silent or display messages, default FALSE
#' @param ... Additional parameters (not used there)
#' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
+#' @aliases summary.bilanmigration
#' @export
setMethod("summary",signature=signature(object="BilanMigration"),definition=function(object,silent=FALSE,...){
bilanMigrationMult<-as(object,"BilanMigrationMult")
Modified: pkg/stacomir/R/BilanMigrationInterAnnuelle.r
===================================================================
--- pkg/stacomir/R/BilanMigrationInterAnnuelle.r 2017-05-08 06:58:19 UTC (rev 356)
+++ pkg/stacomir/R/BilanMigrationInterAnnuelle.r 2017-05-08 13:37:07 UTC (rev 357)
@@ -150,7 +150,7 @@
for (y in 1:length(missing_years)){
Y<-missing_years[y]
bM=new("BilanMigration")
- funout(gettextf("Running Bilanmigration for year %s",Y,domain="R-StacomiR"))
+ if (!silent) funout(gettextf("Running Bilanmigration for year %s",Y,domain="R-StacomiR"))
bM=choice_c(bM,
dc=dic[i],
taxons=object at taxons@data$tax_nom_latin,
Modified: pkg/stacomir/inst/examples/bilanMigrationInterannuelle_example.R
===================================================================
--- pkg/stacomir/inst/examples/bilanMigrationInterannuelle_example.R 2017-05-08 06:58:19 UTC (rev 356)
+++ pkg/stacomir/inst/examples/bilanMigrationInterannuelle_example.R 2017-05-08 13:37:07 UTC (rev 357)
@@ -22,7 +22,7 @@
stades=c("AGJ"),
anneedebut="1990",
anneefin="2015",
- silent=FALSE)
+ silent=TRUE)
bmi<-charge(bmi,silent=TRUE)
bmi<-connect(bmi,silent=TRUE)
}
@@ -99,17 +99,17 @@
}
data("bmi_vichy")
# statistics for seaonal migration, daily values
-bmi_vichy<-calcule(bmi_vichy,timesplit="jour")
+bmi_vichy<-calcule(bmi_vichy,timesplit="jour",silent=TRUE)
#bmi_vichy at calcdata #check this to see the results
# statistics for seaonal migration, weekly values
-bmi_vichy<-calcule(bmi_vichy,timesplit="semaine")
+bmi_vichy<-calcule(bmi_vichy,timesplit="semaine",silent=TRUE)
#bmi_vichy at calcdata
# the plot method also runs calcule
-plot(bmi_vichy,plot.type="seasonal",timesplit="semaine")
-plot(bmi_vichy,plot.type="seasonal",timesplit="mois")
-plot(bmi_vichy,plot.type="seasonal",timesplit="jour")
+plot(bmi_vichy,plot.type="seasonal",timesplit="semaine",silent=TRUE)
+plot(bmi_vichy,plot.type="seasonal",timesplit="mois",silent=TRUE)
+plot(bmi_vichy,plot.type="seasonal",timesplit="jour",silent=TRUE)
\dontrun{
Modified: pkg/stacomir/inst/tests/testthat/test-06Bilan_MigrationInterAnnuelle.R
===================================================================
--- pkg/stacomir/inst/tests/testthat/test-06Bilan_MigrationInterAnnuelle.R 2017-05-08 06:58:19 UTC (rev 356)
+++ pkg/stacomir/inst/tests/testthat/test-06Bilan_MigrationInterAnnuelle.R 2017-05-08 13:37:07 UTC (rev 357)
@@ -120,7 +120,7 @@
bmi_cha<-charge(bmi_cha,silent=TRUE)
# deleting all data to ensure everything is loaded
supprime(bmi_cha)
- bmi_cha<-connect(bmi_cha)
+ bmi_cha<-connect(bmi_cha,silent=TRUE)
})
@@ -170,7 +170,7 @@
# Test for BilanAnnuel
#####################
bilA=as(bmi,"BilanAnnuels")
- bilA<-connect(bilA)
+ bilA<-connect(bilA,silent=TRUE)
# we test that the BilanAnnuel has the same number as
# BilanMigration
expect_equal(
Modified: pkg/stacomir/man/BilanMigrationInterAnnuelle-class.Rd
===================================================================
--- pkg/stacomir/man/BilanMigrationInterAnnuelle-class.Rd 2017-05-08 06:58:19 UTC (rev 356)
+++ pkg/stacomir/man/BilanMigrationInterAnnuelle-class.Rd 2017-05-08 13:37:07 UTC (rev 357)
@@ -52,7 +52,7 @@
stades=c("AGJ"),
anneedebut="1990",
anneefin="2015",
- silent=FALSE)
+ silent=TRUE)
bmi<-charge(bmi,silent=TRUE)
bmi<-connect(bmi,silent=TRUE)
}
@@ -129,17 +129,17 @@
}
data("bmi_vichy")
# statistics for seaonal migration, daily values
-bmi_vichy<-calcule(bmi_vichy,timesplit="jour")
+bmi_vichy<-calcule(bmi_vichy,timesplit="jour",silent=TRUE)
#bmi_vichy at calcdata #check this to see the results
# statistics for seaonal migration, weekly values
-bmi_vichy<-calcule(bmi_vichy,timesplit="semaine")
+bmi_vichy<-calcule(bmi_vichy,timesplit="semaine",silent=TRUE)
#bmi_vichy at calcdata
# the plot method also runs calcule
-plot(bmi_vichy,plot.type="seasonal",timesplit="semaine")
-plot(bmi_vichy,plot.type="seasonal",timesplit="mois")
-plot(bmi_vichy,plot.type="seasonal",timesplit="jour")
+plot(bmi_vichy,plot.type="seasonal",timesplit="semaine",silent=TRUE)
+plot(bmi_vichy,plot.type="seasonal",timesplit="mois",silent=TRUE)
+plot(bmi_vichy,plot.type="seasonal",timesplit="jour",silent=TRUE)
\dontrun{
Modified: pkg/stacomir/man/calcule-BilanMigration-method.Rd
===================================================================
--- pkg/stacomir/man/calcule-BilanMigration-method.Rd 2017-05-08 06:58:19 UTC (rev 356)
+++ pkg/stacomir/man/calcule-BilanMigration-method.Rd 2017-05-08 13:37:07 UTC (rev 357)
@@ -3,6 +3,7 @@
\docType{methods}
\name{calcule,BilanMigration-method}
\alias{calcule,BilanMigration-method}
+\alias{calcule.bilanmigration}
\title{calcule method for BilanMigration}
\usage{
\S4method{calcule}{BilanMigration}(object, negative = FALSE, silent = FALSE)
Modified: pkg/stacomir/man/charge-BilanMigration-method.Rd
===================================================================
--- pkg/stacomir/man/charge-BilanMigration-method.Rd 2017-05-08 06:58:19 UTC (rev 356)
+++ pkg/stacomir/man/charge-BilanMigration-method.Rd 2017-05-08 13:37:07 UTC (rev 357)
@@ -3,6 +3,7 @@
\docType{methods}
\name{charge,BilanMigration-method}
\alias{charge,BilanMigration-method}
+\alias{charge.bilanmigration}
\title{charge method for BilanMigration}
\usage{
\S4method{charge}{BilanMigration}(object, silent = FALSE)
Modified: pkg/stacomir/man/choice_c-BilanMigration-method.Rd
===================================================================
--- pkg/stacomir/man/choice_c-BilanMigration-method.Rd 2017-05-08 06:58:19 UTC (rev 356)
+++ pkg/stacomir/man/choice_c-BilanMigration-method.Rd 2017-05-08 13:37:07 UTC (rev 357)
@@ -3,6 +3,7 @@
\docType{methods}
\name{choice_c,BilanMigration-method}
\alias{choice_c,BilanMigration-method}
+\alias{choice_c.bilanmigration}
\title{command line interface for BilanMigration class}
\usage{
\S4method{choice_c}{BilanMigration}(object, dc, taxons, stades, datedebut,
Modified: pkg/stacomir/man/connect-BilanMigration-method.Rd
===================================================================
--- pkg/stacomir/man/connect-BilanMigration-method.Rd 2017-05-08 06:58:19 UTC (rev 356)
+++ pkg/stacomir/man/connect-BilanMigration-method.Rd 2017-05-08 13:37:07 UTC (rev 357)
@@ -3,6 +3,7 @@
\docType{methods}
\name{connect,BilanMigration-method}
\alias{connect,BilanMigration-method}
+\alias{connect.bilanmigration}
\title{connect method for BilanMigration}
\usage{
\S4method{connect}{BilanMigration}(object, silent = FALSE)
Modified: pkg/stacomir/man/plot-BilanMigration-ANY-method.Rd
===================================================================
--- pkg/stacomir/man/plot-BilanMigration-ANY-method.Rd 2017-05-08 06:58:19 UTC (rev 356)
+++ pkg/stacomir/man/plot-BilanMigration-ANY-method.Rd 2017-05-08 13:37:07 UTC (rev 357)
@@ -3,10 +3,11 @@
\docType{methods}
\name{plot,BilanMigration,ANY-method}
\alias{plot,BilanMigration,ANY-method}
+\alias{plot.bilanmigration}
\title{Plots of various type for BilanMigration.}
\usage{
\S4method{plot}{BilanMigration,ANY}(x, y, plot.type = "standard",
- silent = FALSE, ...)
+ color = NULL, color_ope = NULL, silent = FALSE, ...)
}
\arguments{
\item{x}{An object of class BilanMigration}
@@ -16,14 +17,14 @@
\item{plot.type}{One of "standard","step". Defaut to \code{standard} the standard BilanMigration with dc and operation displayed, can also be \code{step} or
\code{multiple}}
-\item{silent}{Stops displaying the messages.}
-
-\item{...}{Additional arguments passed to matplot or plot if plot.type="standard", see ... in \link{fungraph_civelle} and \link{fungraph}}
-
\item{color}{Default NULL, argument passed for the plot.type="standard" method. A vector of color in the following order : (1) working, (2) stopped, (3:7) 1...5 types of operation,
(8:11) numbers, weight, NULL, NULL (if glass eel), (8:11) measured, calculated, expert, direct observation for other taxa. If null will be set to brewer.pal(12,"Paired")[c(8,10,4,6,1,2,3,5,7)]}
\item{color_ope}{Default NULL, argument passed for the plot.type="standard" method. A vector of color for the operations. Default to brewer.pal(4,"Paired")}
+
+\item{silent}{Stops displaying the messages.}
+
+\item{...}{Additional arguments passed to matplot or plot if plot.type="standard", see ... in \link{fungraph_civelle} and \link{fungraph}}
}
\description{
\itemize{
Modified: pkg/stacomir/man/print-BilanMigration-method.Rd
===================================================================
--- pkg/stacomir/man/print-BilanMigration-method.Rd 2017-05-08 06:58:19 UTC (rev 356)
+++ pkg/stacomir/man/print-BilanMigration-method.Rd 2017-05-08 13:37:07 UTC (rev 357)
@@ -3,6 +3,7 @@
\docType{methods}
\name{print,BilanMigration-method}
\alias{print,BilanMigration-method}
+\alias{print.bilanmigration}
\title{Method to print the command line of the object}
\usage{
\S4method{print}{BilanMigration}(x, ...)
Modified: pkg/stacomir/man/summary-BilanMigration-method.Rd
===================================================================
--- pkg/stacomir/man/summary-BilanMigration-method.Rd 2017-05-08 06:58:19 UTC (rev 356)
+++ pkg/stacomir/man/summary-BilanMigration-method.Rd 2017-05-08 13:37:07 UTC (rev 357)
@@ -3,6 +3,7 @@
\docType{methods}
\name{summary,BilanMigration-method}
\alias{summary,BilanMigration-method}
+\alias{summary.bilanmigration}
\title{summary for bilanMigration
calls functions funstat and funtable to create migration overviews
and generate csv and html output in the user data directory}
More information about the Stacomir-commits
mailing list