Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
Update description file with date and version
  • Loading branch information
barriern committed Sep 19, 2019
2 parents dba477f + 474298c commit 61f7719
Show file tree
Hide file tree
Showing 179 changed files with 3,408 additions and 1,614 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ vignettes/*.pdf
# vim backup

*~

man/*Rd
inst/extdata/Rplots.pdf
inst/extdata/plot_test.R
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: osmose
Type: Package
Title: Object Oriented Simulator of Marine Ecosystems
Version: 0.1.3
Date: 2018-12-12
Version: 1.0.0
Date: 2019-09-19
Authors@R: c(
person("Yunne-Jai", "Shin", role="aut"),
person("Travers", "Morgane", role="aut"),
Expand Down Expand Up @@ -37,8 +37,8 @@ Imports:
utils,
knitr,
rmarkdown,
ggplot2,
ncdf4
ncdf4,
mgcv
URL: http://www.osmose-model.org/
LazyData: FALSE
BugReports: https://github.com/osmose-model/osmose/issues
Expand Down
43 changes: 37 additions & 6 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,34 @@ S3method(getVar,osmose)
S3method(getVar,osmose.config)
S3method(plot,osmose)
S3method(plot,osmose.abundance)
S3method(plot,osmose.abundanceDistribByAge)
S3method(plot,osmose.abundanceDistribBySize)
S3method(plot,osmose.abundanceDistribByTL)
S3method(plot,osmose.biomass)
S3method(plot,osmose.biomassDistribByAge)
S3method(plot,osmose.biomassDistribBySize)
S3method(plot,osmose.biomassDistribByTL)
S3method(plot,osmose.biomassPredPreyIni)
S3method(plot,osmose.config)
S3method(plot,osmose.dietMatrix)
S3method(plot,osmose.dietMatrixbyAge)
S3method(plot,osmose.dietMatrixbySize)
S3method(plot,osmose.meanSize)
S3method(plot,osmose.meanSizeCatch)
S3method(plot,osmose.meanTLByAge)
S3method(plot,osmose.meanTLBySize)
S3method(plot,osmose.mortalityRate)
S3method(plot,osmose.mortalityRateDistribByAge)
S3method(plot,osmose.mortalityRateDistribBySize)
S3method(plot,osmose.predatorPressure)
S3method(plot,osmose.predatorPressureDistribByAge)
S3method(plot,osmose.predatorPressureDistribBySize)
S3method(plot,osmose.yield)
S3method(plot,osmose.yieldByAge)
S3method(plot,osmose.yieldBySize)
S3method(plot,osmose.yieldN)
S3method(plot,osmose.yieldNByAge)
S3method(plot,osmose.yieldNBySize)
S3method(print,osmose)
S3method(print,summary.osmose)
S3method(report,osmose)
Expand All @@ -17,6 +41,7 @@ S3method(summary,osmose.dietMatrix)
S3method(summary,osmose.meanTL)
S3method(summary,osmose.meanTLCatch)
S3method(summary,osmose.mortalityRate)
export(F_msy)
export(correct_ltl_file)
export(existOsmoseParameter)
export(extract_grid_mask)
Expand All @@ -25,13 +50,18 @@ export(find_species_index)
export(getAverageMortality)
export(getFishingBaseRate)
export(getFishingMortality)
export(getGrowthParameters)
export(getMortality)
export(getMortalityDeviation)
export(getOsmoseParameter)
export(getSizeSpectrum)
export(getVar)
export(list_osmose_versions)
export(make_movement_netcdf)
export(osmose2R)
export(osmoseGrowth)
export(osmose_calib_demo)
export(osmose_demo)
export(readOsmoseConfiguration)
export(read_osmose)
export(report)
Expand All @@ -42,24 +72,23 @@ export(writeFishingFiles)
export(write_osmose)
import(grDevices)
import(graphics)
importFrom(ggplot2,geom_area)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,ggtitle)
importFrom(ggplot2,scale_fill_brewer)
importFrom(ggplot2,scale_fill_manual)
importFrom(ggplot2,theme)
importFrom(knitr,knit)
importFrom(mgcv,gam)
importFrom(ncdf4,nc_close)
importFrom(ncdf4,nc_create)
importFrom(ncdf4,nc_open)
importFrom(ncdf4,ncatt_get)
importFrom(ncdf4,ncatt_put)
importFrom(ncdf4,ncdim_def)
importFrom(ncdf4,ncvar_def)
importFrom(ncdf4,ncvar_get)
importFrom(ncdf4,ncvar_put)
importFrom(rlist,list.merge)
importFrom(rmarkdown,render)
importFrom(stats,dlnorm)
importFrom(stats,dnorm)
importFrom(stats,median)
importFrom(stats,predict)
importFrom(stats,qnorm)
importFrom(stats,quantile)
importFrom(stats,sd)
Expand All @@ -69,4 +98,6 @@ importFrom(stringr,str_sub)
importFrom(stringr,str_trim)
importFrom(utils,read.csv)
importFrom(utils,read.table)
importFrom(utils,tail)
importFrom(utils,write.csv)
importFrom(utils,write.table)
11 changes: 6 additions & 5 deletions R/aaa-.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ NULL
NULL
#' @importFrom stats median sd quantile setNames dlnorm dnorm qnorm
NULL
#' @importFrom utils read.csv read.table write.table
#' @importFrom utils read.csv read.table write.table tail write.csv
NULL
#' @importFrom rlist list.merge
NULL
#' @importFrom stringr str_split str_trim str_sub
NULL
# barrier.n: adding some functions for ggplot
#' @importFrom ggplot2 ggplot geom_area scale_fill_brewer scale_fill_manual theme ggtitle
NULL
#' @importFrom rmarkdown render
NULL
#' @importFrom knitr knit
NULL
#' @importFrom ncdf4 nc_open nc_close ncvar_put ncvar_get ncvar_put nc_create ncdim_def
#' @importFrom ncdf4 nc_open nc_close ncvar_put ncvar_get ncvar_put nc_create ncdim_def ncatt_get ncvar_def ncatt_put
NULL
#' @importFrom mgcv gam
NULL
#' @importFrom stats predict
NULL
12 changes: 12 additions & 0 deletions R/osmose-auxiliar.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@

#' Returns the list of Osmoee Java versions
#'
#' @return List of Osmose Java versions
#' @export
#'
#' @examples list_osmose_versions()
list_osmose_versions = function() {
dirin = system.file(package="osmose", "java")
output = list.files(path=dirin, pattern=".jar")
return(output)
}

#
# isfalse = function(x) {
# output = !isTRUE(x)
Expand Down
9 changes: 6 additions & 3 deletions R/osmose-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ plot.osmose = function(x, what = "biomass", ...) {
#' Get variable
#' @description Function to get a variable from an object of \code{osmose}
#' class. This function uses the getVar method (see the \code{\link{getVar.osmose}}).
#'
#' @param object Object of \code{osmose} class (see the \code{\link{read_osmose}} function).
#' @param var Name of variable to extract. It could be: "biomass","abundance",
#' "yield", "yieldN".
#' @param what Variable to extract
#' @param how Output format
#' @param ... Additional arguments of the function.
#'
#' @return An array or a list containing the extracted data.
#' @export
getVar = function(object, what, how, ...) {
Expand Down Expand Up @@ -67,8 +69,9 @@ getVar.osmose = function(object, what, how=c("matrix", "data.frame", "list"),
stop(message)
}

if(inherits(out, "array") & isTRUE(expected))
if(inherits(out, "array") & isTRUE(expected)) {
out = apply(out, c(1, 2), mean, na.rm=TRUE)
}

if(how=="matrix") return(out)

Expand Down
Loading

0 comments on commit 61f7719

Please sign in to comment.